-
Notifications
You must be signed in to change notification settings - Fork 77
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
Support cargoExtraArgs = "--bin bin-target-name"
(or similar) when buildPackage
is used without explicitly setting cargoArtifacts
#268
Comments
Thanks for reporting this @iliana! It was always the intention to maintain the same project structure (including any targets) between the deps-only and final builds (so that setting
Great observation, this is exactly the root of the problem! Although we go to some lengths to preserve targets listed in The solution here is to expand the dummification logic to also peek at any autotargets (unless |
cargoExtraArgs = "--bin bin-target-name"
(or similar)cargoExtraArgs = "--bin bin-target-name"
(or similar) when buildPackage
is used without explicitly setting cargoArtifacts
Right now
cargoExtraArgs = "--bin bin-target-name"
(usually1) doesn't work if you only specifylib.buildPackage
(i.e., you don't split out the twolib.buildDepsOnly
andlib.buildPackage
steps yourself). I think this is due tobuildDepsOnly
clearing out your project's source code so it can build just the deps; whatever bin target you were looking for isn't there anymore.A log from this situation:
This is not a strong necessity for me but it seems like an issue someone else might trip over. Having some additional options for specifying targets (or even packages of a workspace?) to build would make the interface nicer.
Footnotes
In a project I'm working on I got fooled into thinking it would work because the package I was building had a
[[bin]]
section manually declaring the bin target in Cargo.toml, which I think is why it worked in thebuildDepsOnly
stage? ↩The text was updated successfully, but these errors were encountered: