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

Dont modify the source dir during code generation from proto file #45

Merged
merged 2 commits into from
Dec 4, 2020

Conversation

neithanmo
Copy link
Contributor

It is not recommended to modify the source dir according to docs:
In general, build scripts should not modify any files outside of OUT_DIR. It may seem fine on the first blush, but it does cause problems when you use such crate as a dependency because there's an implicit invariant that sources in .cargo/registry should be immutable. cargo won't allow such scripts when packaging.

Also, this causes a problem with the cargo-publish command that checks if the source dir was modified during the build process.

The solution here was taken from here as a solution for other issues that don't allow using include! or path macros directly.

@neithanmo neithanmo requested a review from jleni December 3, 2020 21:48
@jleni jleni merged commit 0d8b5d4 into dev Dec 4, 2020
@jleni jleni linked an issue Dec 4, 2020 that may be closed by this pull request
@neithanmo neithanmo deleted the publish branch December 16, 2020 16:17
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

Successfully merging this pull request may close these issues.

Problems when publishing
2 participants