-
Notifications
You must be signed in to change notification settings - Fork 92
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
I think crane mangles my cargo.toml #527
Comments
Update: I found out this worked on 0.14.1, but broke on 0.14.2 I can see a lot of dependencies were updated between those versions, maybe this is actually a bug in toml-edit? |
My initial thought. If you could bisect it it would probably be very helpful. |
I also added a failing test for you here (not ran it myself, but it should be correct): https://github.com/pingiun/crane/tree/sqlx-workspace-test |
Makes sense. |
Hi @pingiun thanks for the report and the test case! Definitely looks like a bug with Happy to get it updated and merged here as soon as a new release is published! |
Oh hmm we're a minor version behind, let me see if bumping it will fix it first |
Same issue with Here's the branch: https://github.com/ipetkov/crane/compare/toml_edit |
I don't know if I understand this bug well enough. Do you know what toml_edit functions manifest this error? I have not really looked into your code, or toml_edit for that matter, I'm just a user of crane for building projects |
Looks like there is a report for it here: toml-rs/toml#691 |
Personally, I've bisected this to f23ae17. The mangled output I see, if it helps, is: [
# dev-dependencies can't be optional, so this is a regular dependency
dependencies.criterion ]
version = "0.5.0"
optional = true A not-so-minimal reproducer is to add this dependency to the project-to-be-built-with-crane: [dependencies.ruma]
git = "https://github.com/ruma/ruma"
rev = "1a1c61ee1e8f0936e956a3b69c931ce12ee28475"
features = [
"compat",
"rand",
"appservice-api-c",
"client-api",
"federation-api",
"push-gateway-api-c",
"state-res",
"unstable-msc2448",
"unstable-msc3575",
"unstable-exhaustive-types",
"ring-compat",
"unstable-unspecified",
] |
Would it be possible to workaround it by not doing the sequence that trigger this bug? :D |
Looks like this will be fixed with #583 |
Yep, I no longer get the build failure I was experiencing before, it works now |
ipetkov/crane#527 is now fixed
ipetkov/crane#527 is now fixed
ipetkov/crane#527 is now fixed
My situation:
I have made modifications to sqlx, they live in my branch. sqlx is a workspace project
In my own project, I depend on sqlx via git. My own project is also a workspace.
I get this error when building my project
Nix build logs
The critical part is transforming the
tokio
dependency for sqlx-mysql so it's settings are copied from the sqlx workspace.First, the generated Cargo.toml in full:
Cargo.toml for sqlx-mysql
I believe it tries to transform this:
Into this:
But the comment gets inserted in the wrong place so it ends up with this:
I hope this is enough to diagnose the issue and fix it, if not please let me know!
The text was updated successfully, but these errors were encountered: