#cargo.toml modified on windows build command?

10 messages · Page 1 of 1 (latest)

weary spindle
#

Hello, I am building my application with cargo tauri build on a windows box. I do all the dev on linux. Seems like something is touching the Cargo.toml file in one of my crates in such a way that git now reports the repo as dirty index. I am using the git_version crate to embed the hash in a version string in the application.

git diff only reports line endings will be replaced, with no visible diff. I have messed with the autoclrf settings in git to no avail, both true and auto.

I know that version information will be read from from cargo.toml file, but I don't understand how the file would be modified in anyway.

Anyone else come across this issue?

small fog
#

good old line endings messing with us again 😮‍💨 the cli is supposed to compare the actual content before writing it though, are you on the latest version? Are you using v1 or v2?

#

btw, as a workaround it should work to use workspace inheritance for the tauri and tauri-build deps

weary spindle
#

Yes, line endings should not cause so much trouble!

On v1 and yes updated everything to latest yesterday.

Can you be a little more specific about workspace inheritance? The cargo.toml file being changed is in my gui application crate, which is one of many workspace crates (the other crates are dependencies of the gui app crate).

small fog
#

same for tauri-build

#

and then the cli won't try to modify it

weary spindle
#

Ah, nice, I will try this.

#

Would this mean all crates in the workspace would start depending on tauri or would it still be confined to the just the gui crate. Seems strange the cli is modifying the toml file to begin with, why does it do that?

small fog
#

Would this mean all crates in the workspace would start depending on tauri or would it still be confined to the just the gui crate.
No. At least not more than the workspace lockfile already implies.

Seems strange the cli is modifying the toml file to begin with, why does it do that?
In v1 the allowlist is converted to rust feature flags and since a large part of our users are allergic to .rs and .toml files we have to do that for them. Why there's no explicit way to turn it off is beyond me though.
Also, we could probablyyy look into removing that rewrite in v2 completely idk