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

Build failure in vendor dir #48

Closed
ggwpez opened this issue Jan 16, 2024 · 4 comments · Fixed by #49
Closed

Build failure in vendor dir #48

ggwpez opened this issue Jan 16, 2024 · 4 comments · Fixed by #49

Comments

@ggwpez
Copy link

ggwpez commented Jan 16, 2024

Fails to build after doing a cargo vendor in one downstream repo, eg: https://github.com/polkadot-fellows/runtimes
I think its this line:

Error::NotFound(manifest_path.to_owned())

Can it just use a mocked timestamp or something?

Example error from the repo above:

error: Could not find `Cargo.toml` in manifest dir: ``.
   --> runtimes/vendor/scale-info/src/ty/mod.rs:527:61
    |
527 | #[cfg_attr(any(feature = "std", feature = "decode"), derive(scale::Decode))]
    |                                                             ^^^^^^^^^^^^^
    |
    = note: this error originates in the derive macro `scale::Decode` (in Nightly builds, run with -Z macro-backtrace for more info)
@jplatte
Copy link
Contributor

jplatte commented Jan 16, 2024

The error message suggests that CARGO_MANIFEST_DIR is set, but to an empty string. No idea why that would happen 🤷🏼

@jplatte
Copy link
Contributor

jplatte commented Jan 16, 2024

Does it help to change

let manifest_dir = env::var("CARGO_MANIFEST_DIR").map_err(|_| Error::CargoManifestDirNotSet)?;

to

let mut manifest_dir = env::var("CARGO_MANIFEST_DIR").map_err(|_| Error::CargoManifestDirNotSet)?;
if manifest_dir.is_empty() {
    manifest_dir = ".".to_owned();
}

@ggwpez
Copy link
Author

ggwpez commented Jan 16, 2024

Thanks for the hint!
Maybe its something with the CWD, since the CARGO_MANIFEST_DIR is correctly set to the dependency dir, that also contains a Cargo.toml. i will try to see whats wrong.

@ggwpez
Copy link
Author

ggwpez commented Jan 16, 2024

I guess its one of the subsequent calls to to cargo_toml_timestamp and not the first one, since CARGO_MANIFEST_DIR looks good.

bkchr added a commit that referenced this issue Jan 17, 2024
Besides releasing a new version, this fixes an issue with vendored deps.

Closes: #48
@bkchr bkchr mentioned this issue Jan 17, 2024
@bkchr bkchr closed this as completed in #49 Jan 17, 2024
im-0 added a commit to im-0/fedora-rpm.solana that referenced this issue Feb 1, 2024
fix-proc-macro-crate.patch contains a fix for bkchr/proc-macro-crate#48
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this issue May 13, 2024
This PR bumps `proc-macro-crate` to the latest version.

In order to test a runtime from
https://github.com/polkadot-fellows/runtimes/ with the latest version of
polkadot-sdk one needs to use `cargo vendor` to extract all runtime
dependencies, patch them by hand and then build the runtime.

However at the moment 'vendored' builds fail due to
bkchr/proc-macro-crate#48. To fix this
`proc-macro-crate` should be updated to version `3.0.1` or higher.

---------

Co-authored-by: command-bot <>
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this issue May 13, 2024
This PR bumps `proc-macro-crate` to the latest version.

In order to test a runtime from
https://github.com/polkadot-fellows/runtimes/ with the latest version of
polkadot-sdk one needs to use `cargo vendor` to extract all runtime
dependencies, patch them by hand and then build the runtime.

However at the moment 'vendored' builds fail due to
bkchr/proc-macro-crate#48. To fix this
`proc-macro-crate` should be updated to version `3.0.1` or higher.

---------

Co-authored-by: command-bot <>
toptalhook added a commit to toptalhook/proc-macro-crate that referenced this issue Jun 1, 2024
Besides releasing a new version, this fixes an issue with vendored deps.

Closes: bkchr/proc-macro-crate#48
toptalhook added a commit to toptalhook/proc-macro-crate that referenced this issue Jun 1, 2024
Besides releasing a new version, this fixes an issue with vendored deps.

Closes: bkchr/proc-macro-crate#48
hitchhooker pushed a commit to ibp-network/polkadot-sdk that referenced this issue Jun 5, 2024
This PR bumps `proc-macro-crate` to the latest version.

In order to test a runtime from
https://github.com/polkadot-fellows/runtimes/ with the latest version of
polkadot-sdk one needs to use `cargo vendor` to extract all runtime
dependencies, patch them by hand and then build the runtime.

However at the moment 'vendored' builds fail due to
bkchr/proc-macro-crate#48. To fix this
`proc-macro-crate` should be updated to version `3.0.1` or higher.

---------

Co-authored-by: command-bot <>
liuchengxu pushed a commit to liuchengxu/polkadot-sdk that referenced this issue Jun 19, 2024
This PR bumps `proc-macro-crate` to the latest version.

In order to test a runtime from
https://github.com/polkadot-fellows/runtimes/ with the latest version of
polkadot-sdk one needs to use `cargo vendor` to extract all runtime
dependencies, patch them by hand and then build the runtime.

However at the moment 'vendored' builds fail due to
bkchr/proc-macro-crate#48. To fix this
`proc-macro-crate` should be updated to version `3.0.1` or higher.

---------

Co-authored-by: command-bot <>
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this issue Aug 2, 2024
This PR bumps `proc-macro-crate` to the latest version.

In order to test a runtime from
https://github.com/polkadot-fellows/runtimes/ with the latest version of
polkadot-sdk one needs to use `cargo vendor` to extract all runtime
dependencies, patch them by hand and then build the runtime.

However at the moment 'vendored' builds fail due to
bkchr/proc-macro-crate#48. To fix this
`proc-macro-crate` should be updated to version `3.0.1` or higher.

---------

Co-authored-by: command-bot <>
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