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

cargo contract build doesn't overwrite build.rs path #1060

Closed
ordian opened this issue Apr 2, 2023 · 2 comments · Fixed by #1077
Closed

cargo contract build doesn't overwrite build.rs path #1060

ordian opened this issue Apr 2, 2023 · 2 comments · Fixed by #1077

Comments

@ordian
Copy link

ordian commented Apr 2, 2023

Hey, I have a contract with subcrates roughly the following structure:

Cargo.toml (workspace root)
lib.rs
├─ a
│  ├─ b (Not relevant)
│  │  ├─ Cargo.toml 
│  │  └─ src 
│  │     └─ main.rs
│  └─ c
│     ├─ d
│     │  ├─ Cargo.toml
│     │  └─ src
│     │     └─ main.rs
│     ├─ Cargo.toml  <--------------- this one contains
│     ├─ src
│     │  └─ lib.rs
│     └─ build.rs

when trying to build it with cargo contract build I get

couldn't read a/c/build.rs: No such file or directory (os error 2)

Looking at https://github.com/paritytech/cargo-contract/blob/1d28f4ef3863e1f6a438f59890545eb87e1e863a/crates/build/src/workspace/manifest.rs#L423 I don't see where you overwrite path for build.rs file?

@ascjones
Copy link
Collaborator

Hey @ordian, sorry for the late response I have been away.

I've put in a quick fix in #1077, can you double check that it fixes your issue?

@ordian
Copy link
Author

ordian commented Apr 24, 2023

Sorry, didn't have time to test this, but will do later this week and report back.

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 a pull request may close this issue.

2 participants