-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(tauri-cli, tauri-build): copy external binaries only during bundling #14633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…ing, not regular builds
|
It's not a particularly clean fix, just moving enough out of |
Package Changes Through 87dd595There are 3 changes which include tauri-macos-sign with patch, tauri-bundler with patch, tauri-cli with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
| ) -> Result<()> { | ||
| for src in binaries { | ||
| let src = src?; | ||
| println!("cargo:rerun-if-changed={}", src.display()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was necessary because copy_binaries was in the build script. Moving it to the bundler will always refresh the binaries before bundling, which is fine unless they take a long time to copy.
The build script does so much shit so that users can use eg |
|
Is it currently possible to build a fully functional Tauri app without calling |
|
I've tried before and simply running |
|
Ok, so the helloworld example does run with just cargo, never mind then.. Must be something else preventing my other app from running. |
|
This fix has been working for me so far, I guess this would hinge on whether it is expected that bundling only works with tauri-cli. The only way to break even less workflows would be to copy the binaries as best possible, ignoring errors in tauri-build and then copy again with strict error checking in tauri-cli, but this seems even less pretty. Thoughts? |
|
Does this change break |
|
That is a valid point and a use case which would be broken through this change. We could as said opt to be more conservative and ignore some types of errors (NotFound) when called from the build script. If somebody is relying on wrong paths in externalBins being found at build time, he would then receive a more obscure error when running |
|
This is quite tricky, I'm not sure if ignoring error here is a good choice here either since you wouldn't notice the error until much later when your app or other things call it |
|
I understand this is technically breaking, but to play devil's advocate, the externalBin configuration is under Somebody doing this would need to distinguish whether their app is built in debug or release mode to reliably call the right binaries, is that possible? |
|
i don't care about |
|
I am not sure if this is a good idea even without the breaking change, to me, I would expect the whole thing to just work when I run About the fact that those settings are under |
Should fix #14602
I'm a bit unsure about moving things from the build script to the
tauri-cli, since parts of the bundler were placed deliberately in the build script.If possible, moving as much as possible from the build script into the
tauri-clicould improve code comprehension.