-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[bug] tauri build
modifies Cargo.toml
?
#8711
Comments
I think it might be for this feature injection thing: tauri/tooling/cli/src/interface/rust/manifest.rs Lines 299 to 310 in 00e1567
|
yep, that's it. You can disable it by using workspace inheritance for the tauri dependency as a workaround. |
For the Tauri dep itself, e.g. For anyone else who runs into this, it ultimately turned out to be a problem with line endings, which I solved (assuming the PR is merged) by adding a .gitattributes file with I still don't love rewriting Cargo.toml, but the rewrite was actually correct, it's just that Github had it out on our Windows runner as CRLF and then the I wish CRLF would just disappear, I'm pretty sure modern Windows tools all handle LF just fine :/ |
yup Okay, the check would probably fail on line endings (or maybe we have that check already and this is exactly what's happening 🤔)
Same :( |
Nah I didn't have It's just that Anyway here's a repro case where it doesn't round-trip carriage returns https://github.com/ReactorScram/toml_edit_repro/blob/b348a5bbc9ae64b43e4ae82ffbab1fda35f68ca2/src/main.rs#L3 |
The rewriting |
In my Cargo.toml, I have the following:
When build, it is still changing the file to LF. Did I miss something? |
maybe try the same with tauri-build 🤔 |
Having this similar issue now: firezone/firezone#6597 I'd like to use the Is that possible? |
Describe the bug
Running
stat src-tauri/Cargo.toml && pnpm tauri build --bundles none > /dev/null 2> /dev/null && stat src-tauri/Cargo.toml
I see the mtime for my Cargo.toml changes after
pnpm tauri build
. If I do the same with onlycargo build --release
, the mtime doesn't change, so I think it must be in Tauri.My
beforeDevCommand
andbeforeBuildCommand
are empty strings, so I don't think anything else in my build pipeline should be modifying the Cargo.toml manifest.Reproduction
I can go back and make a repro repository, I'm just curious if this is intended behavior and if there's anything I can do to disable it.
Expected behavior
I expect Cargo.toml to not change during the build process.
I'm trying to embed the Git version in my final exe and for some possibly Windows-specific reason, this modification is causing the Git version to show up as dirty / modified
Full
tauri info
outputStack trace
Additional context
I searched in issues and docs but of course "Cargo.toml" and even "manifest" returned a lot of false positives, so maybe I missed something.
The text was updated successfully, but these errors were encountered: