-
Notifications
You must be signed in to change notification settings - Fork 110
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 chef cook altering Cargo.toml and breaking projects in workspace #31
Comments
Sry, i now realized that EDIT:I restored the example and can confirm that the changes are happening i assumed above. After running after running the command fn main() {} As additional information – and why i relate this to issue #4 – i am importing |
This is by design, as discussed in #4 - Some of the improvements discussed in #4 should hopefully avoid this surprise in the future. |
EDIT:
I realized that issue #27 is absolutely relevant here. I think its all just fine the way things are working and i guess i understand the reasons behind it – delete all the "code" and just fill the target folder with the compiled dependencies. The "real" code comes back later in the build stage. Silly me. I just tried it with a little project and it worked (just using the docker commands) and i wanted it to extend to a more complex one and in the middle of development "take a look" at what cargo-chef would do to see if there are some problems already i need to fix before going the full docker route.
And now that i think i know how this hole thing is working – i feel a little bit stupid. But i agree with the comments in the other issue that a warning would be helpful to make the people using it aware that a) you're not supposed to use it "locally" and b) it will delete and alter your files on purpose and maybe with an explanation why. I'll try to get my test project working without "test cooking" locally and use it like it is supposed to :P
---- original message
I think this is related to issue #4 but i have the additional problem that
cargo chef cook
is also breaking my project by altering the respective Cargo.toml files from each project under a workspace. I have prepared a test project for you to replicate https://github.com/pythoneer/docker_build_testcargo make build
runs finecargo chef prepare --recipe-path recipe.json
looks like its doing OK (can't tell if the *.json is correct)cargo chef cook --recipe-path recipe.json
breaks the project andcargo make build
does not build the project anymore because the Cargo.toml files are just wrong nowI don't know if this is not supposed to work in the first place because i haven't found a hint in the README (maybe the section about
Limitations and caveats
but to be honest i don't really understand that 100%)I hope this helps. If you need any more information i am glad to help.
(love your book 👍 )
The text was updated successfully, but these errors were encountered: