Skip to content
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

buildTrunkPackage fails with trunk from nixpkgs #735

Closed
antifuchs opened this issue Nov 8, 2024 · 3 comments · Fixed by #736
Closed

buildTrunkPackage fails with trunk from nixpkgs #735

antifuchs opened this issue Nov 8, 2024 · 3 comments · Fixed by #736
Labels
bug Something isn't working

Comments

@antifuchs
Copy link

antifuchs commented Nov 8, 2024

Describe the bug

Using buildTrunkPackage with trunk 0.21.1 from nixpkgs-unstable results in an unfortunate error when the profile that's being built is release:

Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
++ command cargo --version
cargo 1.82.0 (8f40fc59f 2024-08-21)
error: invalid value './index.html' for '--release [<RELEASE>]'
  [possible values: true, false]

That's because buildTrunkPackage passes --release (here) and trunk requires --release=true now (I suspect introduced in this change).

I've reported this to the trunk maintainers at trunk-rs/trunk#908, but I suspect crane might want to switch to --release=true instead. What do you think?

Reproduction

Using the example from https://crane.dev/examples/trunk.html with a trunk from this nixpkgs change: NixOS/nixpkgs@fdd01fd reproduces the issue.

@antifuchs antifuchs added the bug Something isn't working label Nov 8, 2024
@antifuchs
Copy link
Author

And oops, trunk 0.20.1 (in nixpkgs release 24.05) doesn't allow --release=true. Ugh.

@ipetkov
Copy link
Owner

ipetkov commented Nov 8, 2024

Hi @antifuchs thanks for the report, should be easy enough to conditionally set =true if the trunk version is >= 0.21!

Will be fixed with #736

@antifuchs
Copy link
Author

Awesome, that works for me! Thank you (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants