I don't understand how you're supposed to see @Pre...
# fleet
r
I don't understand how you're supposed to see @Preview output in Fleet. I have the right dependency, the right annotation on a @Composable with no parameters. I found "Open Compose Preview Output" and "Reload Compose Preview" actions but it does nothing
βž• 2
r
Left of your
private fun Preview()
there is a compose icon that you can click. I was only able to see said icon when I added desktop target.
message has been deleted
r
It's not there, I have desktop target as I usually use desktop preview in IntelliJ
r
You are on the latest Fleet version?
r
Yes. After editing the file and saving, reopening the project, doing that multiple times, at some point it finally appeared, not sure what fixed this. It doesn't work anyway
message has been deleted
same 2
c
I think I read somewhere that the current version of Fleet only supports previewing composables that don't accept any parameters.
r
Maybe that is too complex
w
Hey Gael! Quite likely the build we run for the preview fails. There is a critical regression which makes that the build output is not visible anymore. You can vote and follow the progress here FL-25027. I'm trying to have the fix available as soon as possible for you! :).
πŸ‘ 3
In the meantime. Could you try to run it again, and then invoke the action "Open Compose Preview Output"? This will try to open the build output. From here we might be able to solve why the build fails for you.
r
Oh, I thought the output was the view, not the logs. Maybe rename it to Logs? I really expected this option to open the side panel
It really doesn't do anything anyway right now
w
Hmm, which Fleet version are you using?
r
I tried to restart Fleet to try again and it says this
message has been deleted
After restarting Fleet, I have an output.
Copy code
* What went wrong:
Cannot locate tasks that match 'CinematicJourney:configureDesktopPreviewDesktop' as project 'CinematicJourney' not found in root project 'CinematicJourney'.
Looks like it expects a subproject for some reason
πŸ‘€ 1
My project is open source, I'm making it specifically to be able to test stuff and easily share reproducers https://github.com/wizbii/CinematicJourney
w
I tried to restart Fleet to try again and it says this
You can vote for this issue here: FL-25040!
πŸ‘ 1
My project is open source, I'm making it specifically to be able to test stuff and easily share reproducers https://github.com/wizbii/CinematicJourney
That's amazing, I'll jump right on it, thanks!
r
It intentionally does not use the KMP project generator or any IDE generated project, I wanted to know how to make a KMP project from an empty folder, and never saw a use for a subproject
@Wout Werkman I just pushed the exact code I was using locally for those tests
πŸ™ 1
d
Hi guys, I added the common Preview annotation and tried to build the preview in Fleet, but it failed with the error. What can be the reason?
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Task 'configureDesktopPreview__COMPOSE_PREVIEW__' not found in project ':sdks:ui'.
πŸ‘€ 1
r
Both Desktop Preview and Common Preview work for me in the latest Fleet version
πŸ”₯ 2
d
Oh, I just feagured out I don't have a desktop target, since I use Compose multiplaform for Android and iOS targets. Should it be fixed if I add desktop target only to use it in fleet preview?
w
There is a good chance that adding a desktop target will help in this case, but it shouldn't be necessary. The error you showed seems to be an error on our side. One advantage of adding a desktop target is that previews that use expect functions will now work (without a desktop target, we generate stubs for your expects that throw a runtime exception).
r
This is good to know, thanks πŸ™‚
d
@Wout Werkman in such case do you want me to make a reproducer for you?
πŸ”₯ 1
w
That would be extremely valuable, I would love that!
πŸ‘ 2
i
hey @Dmitry Stakhov - we identified the problem, and here is the issue to track: https://youtrack.jetbrains.com/issue/FL-26700 as a workaround for now, you can flatten your projects hierarchy, for example by changing the module from
:sdks:ui
to
:sdks_ui
d
Hi Iliya I already got these great news from Wout. Honestly I didn't expect the issue is in modules nesting. Big thanks for investigating the reason.
πŸ‘ 1
247 Views