Skip to content

Use correct flags after tools change#334

Open
sdassow wants to merge 23 commits intofyne-io:masterfrom
sdassow:fix/changed-app-flags
Open

Use correct flags after tools change#334
sdassow wants to merge 23 commits intofyne-io:masterfrom
sdassow:fix/changed-app-flags

Conversation

@sdassow
Copy link

@sdassow sdassow commented Sep 29, 2025

Description:

Sync changed Fyne CLI tool flags after report on Slack.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@andydotxyz
Copy link
Member

Thanks for this. I guess it will require a new image to support this as well, because the tool installed on them is still the deprecated one I think?

@sdassow
Copy link
Author

sdassow commented Sep 30, 2025

Thanks for this. I guess it will require a new image to support this as well, because the tool installed on them is still the deprecated one I think?

That's what I've been assuming as well so far and haven't found out how to do yet.

@Bluebugs
Copy link
Contributor

You may want to detect the tool version in the image to avoid breaking user experience.

@andydotxyz
Copy link
Member

You may want to detect the tool version in the image to avoid breaking user experience.

That's a good point - switching between this new parameter set vs older one based on the result of fyne version.

It would be pretty painful otherwise - the alternative being forcing the container update on this update - but doing that we would have to have the images out first, which could cause breakage for anyone that updates the images before this update is released...

Revert "Ignore errors to ensure catching the version even if the library version wasn't found"

This reverts commit 91d60df.
@sdassow
Copy link
Author

sdassow commented Oct 3, 2025

If I understand everything, then it's currently broken in the fyne-cross image, and this PR should fix it. And for that to take effect we need to build a new image with these changes first, right?
Other than that, the linter fails because of an old AWS SDK version, so the merge needs some force I think.

@andydotxyz
Copy link
Member

If I understand everything, then it's currently broken in the fyne-cross image, and this PR should fix it. And for that to take effect we need to build a new image with these changes first, right? Other than that, the linter fails because of an old AWS SDK version, so the merge needs some force I think.

I don't think that is the case - Fyne-cross is not included in the image (fyne is).

I'm not sure why it errors with these changes - perhaps it is not installing in the action correctly, or maybe the fix still has problems?

case androidOS:
workDir = volume.JoinPathContainer(workDir, ctx.Package)
if ctx.Keystore != "" {
args = append(args, "-keyStore", ctx.Keystore)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These also need a version check.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, and improved the version checks on the way.

@andydotxyz
Copy link
Member

The macOS issue may be fixed by updating the runner, it has a v1 release now:
douglascamata/setup-docker-macos-action@v1.0.0

@andydotxyz
Copy link
Member

Oh I figured out the problem @sdassow - the fyne binary being checked is the one on the /host/ computer.
That is correct for Darwin but for all others you need to execute fyne version in the container!

@sdassow
Copy link
Author

sdassow commented Oct 4, 2025

Oh I figured out the problem @sdassow - the fyne binary being checked is the one on the /host/ computer. That is correct for Darwin but for all others you need to execute fyne version in the container!

Oh! Haven't looked at it from that perspective, thanks for the pointer, checking that next.

@sdassow
Copy link
Author

sdassow commented Oct 4, 2025

Oh I figured out the problem @sdassow - the fyne binary being checked is the one on the /host/ computer. That is correct for Darwin but for all others you need to execute fyne version in the container!

But fyne-cross detects the version now, so it should work either way, that's what is throwing me still off. The version check uses the same binary path, so the check should kick in. The only way this doesn't happen would be if the fyne-cross code used is the old one, hence my suspicion that it's in some image, and that's also how I still understand the CI logs after reading them a few times more.

@andydotxyz
Copy link
Member

andydotxyz commented Oct 4, 2025

I don't quite understand that comment sorry. Fyne cross sits on the host and prepares a container which contains fyne and all the Go tools. The execution of fyne (except for Darwin) will happen inside the container, but the code you have included to ask what version is running executes on the host.

If, for example, you are running on Linux or BSD you could try removing the fyne binary on the current computer then run fyne-cross. In this case your version check will fail but the build would otherwise complete.

Look at usages of the fyneCommandContainer command inside internal/command/. You can also see how the fynePackageHost vs fynePackage functions differ based on which executable should be used to bundle.

@andydotxyz
Copy link
Member

andydotxyz commented Oct 5, 2025

I think there is a misunderstanding somewhere - the Fyne version was already printed in debug mode.

Here is the output locally when I print the host versions and then execute fyne cross. You can see the docker image contains an older Fyne CLI and it is printed by previously released fyne-cross version:

andy@nostromo ~/C/Fyne/fyne  (develop)
><> fyne version                                                                                                    [21:30:51]
fyne cli version: v1.6.3-0.20251005194804-555a71945e3b
fyne library version: (not found)
andy@nostromo ~/C/Fyne/fyne  (develop)
><> fyne-cross android --debug -app-id io.fyne.hello cmd/hello                                                      [21:30:52]
[i] Target: android/multiple
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"multiple", os:"android", id:"android", env:map[string]string{}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/home/andy/Code/Fyne/fyne", inContainer:"/app"}, command.containerMountPoint{name:"cache", localHost:"/home/andy/.cache/fyne-cross", inContainer:"/go"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:android"}, runner:(*command.localContainerEngine)(0xc0000dc090)}
[i] Cleaning target directories...
[✓] "temp" dir cleaned: /home/andy/Code/Fyne/fyne/fyne-cross/tmp/android
[✓] "bin" dir cleaned: /home/andy/Code/Fyne/fyne/fyne-cross/bin/android
[✓] "dist" dir cleaned: /home/andy/Code/Fyne/fyne/fyne-cross/dist/android
[i] Checking for go.mod: /home/andy/Code/Fyne/fyne/go.mod
[✓] go.mod found
[i] Packaging app...
/usr/bin/podman run --rm -t -w /app -v /home/andy/Code/Fyne/fyne:/app:z -v /home/andy/.cache/fyne-cross:/go:z --userns keep-id -e use_podman=1 --arch=amd64 -e CGO_ENABLED=1 -e GOCACHE=/go/go-build docker.io/fyneio/fyne-cross-images:android /usr/local/b
in/fyne version
fyne cli version: v2.5.5
/usr/bin/podman run --rm -t -w /app/cmd/hello -v /home/andy/Code/Fyne/fyne:/app:z -v /home/andy/.cache/fyne-cross:/go:z --userns keep-id -e use_podman=1 --arch=amd64 -e CGO_ENABLED=1 -e GOCACHE=/go/go-build docker.io/fyneio/fyne-cross-images:android /usr/local/bin/fyne package -os android -name fyne -icon /app/fyne-cross/tmp/android/Icon.png -appBuild 1 -appVersion 1.0.0 -appID io.fyne.hello -release

@andydotxyz
Copy link
Member

Looks like there are 2 failures, the lint which we will have to ignore for now and the other is:

"The configuration 'macos-13-us-default' is not supported"
(I guess GitHub supported platforms changed recently)

@andydotxyz
Copy link
Member

Well done on fixing the CI config.
I guess the remaining issue is related to the macOS build running the final "fyne package" on macOS directly instead of in the container (for XCode access).

adamdecaf added a commit to moov-io/watchman that referenced this pull request Feb 23, 2026
fyne-cross and goreleaser aren't quite ready for Watchman yet.

Issue: fyne-io/fyne-cross#334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants