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

Allow some crates to access more files than just those in their folder #346

Open
Ten0 opened this issue May 1, 2024 · 0 comments
Open

Comments

@Ten0
Copy link

Ten0 commented May 1, 2024

Linked to #17

I have a file architecture such that crates that build references .proto files that are not in the crate folder:

/
 xxx.proto
 xxx_crate/
           build.rs <- references ../xxx.proto

Since those proto files may be used to generate code for multiple languages, it doesn't feel like it would make much sense for the proto file to be inside the xxx_crate.
However when it's outside, the crate naturally can't build.

I'd like to get this to work without altering my file architecture somehow.
However I wouldn't like to trade that off for a full workspace recompilation every time a file changes in the workspace (since the workspace is big, it's very good that it only recompiles granularly, so I don't think #17 should be applied as suggested).

Having an override mechanism that would enable me to get the original path of the crate to fetch any parent proto and add them to the source would be enough for me.
However it seems that currently the Cargo.nix does not export any path information, so I'm not sure how to achieve that.
Any idea?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant