-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo package
doesn't include build script if this has a custom path
#11383
Comments
Oh this doesn't look nice. Thank you for reporting this! If you have no time to wait for a fix but still want to reuse the shared build script, a workaround would be: Inside your package, create a symlink to the shared file. Then modify the value Besides, I believe |
Instructions to fix this
Use |
@rustbot claim |
I don't think this is feasible to fix in the same way as readme or license-file. Although it can possibly copy the root file, cargo wouldn't be able to know about modules (or any other resources included via macros), thus not copying the entire crate. This issue also applies to the |
…ipt) + more tests to cargo-util
Oh deer. You're absolutely right, @ehuss. I totally forgot there is a thing called macro. Here are possible steps of the strategy Eric suggested:
|
hmmm, this limits a bit the possible usage of the Another harder solution and in my opinion logical is that no matter the path of the |
Hey @cdecompilador are you still working on this? |
I don't know why but the commit from where I started didn't pass half the tests, even some unrelated to my project, I will reset and try again so don't worry, also the code was almost done so it shouldn't be much work |
Release assignment due to inactivity. Feel free to pick it up again. @rustbot release-assignment |
@rustbot claim |
There has also been no progress on this issue recently, and I have time to contribute to this issue. |
@rustbot release-assignment |
@linyihai if you weren't aware, we have office hours for contributors to talk over their work synchronously with members of the cargo ream. |
I've heard of |
@rustbot claim Having understood the context of the problem, I intend to look at the problem. Some of the work has already been done , and I intend to build on it. |
Problem
One package can have an entry on the manifest indicating a custom path for the build script, for example:
Steps
Create a multiple packages that share a single build script and for programmability reasons keep just a single build script
Possible Solution(s)
The expected behaviour in this case would be to ship that build script on the root, and a naive solution would be to modify the behavior of the
build
attribute to be optional, so in case that the path is not found, default to the root.The perfect solution would be to modify that entry also on the package, but I don't know if modification of the manifest is on the philosophy of
cargo package
I put the example of
../folder/build.rs
because is the worst-case scenario in which the naive solution is clearly naive, since that dir might exist with another context.Notes
No response
Version
The text was updated successfully, but these errors were encountered: