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

This manifest requires workspace inheritance, but inherit_workspace hasn't been called yet when using Anchor 0.28.0 #2568

Closed
ChewingGlass opened this issue Jul 14, 2023 · 3 comments · Fixed by #2570
Assignees
Labels
bug Something isn't working cli

Comments

@ChewingGlass
Copy link
Contributor

For whatever reason, when using workspace package inheritance with anchor 0.28, I get this error:

Caused by:
    This manifest requires workspace inheritance, but `inherit_workspace` hasn't been called yet

This does not happen on Anchor 0.26.

Can reproduce from https://github.com/helium/helium-program-library

Just avm use 0.28 and anchor build

@acheroncrypto
Copy link
Collaborator

Thanks for reporting, fixed in #2570.

You can update to latest by running:

cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked --force

@billythedummy
Copy link
Contributor

billythedummy commented Jul 26, 2023

Thanks for reporting, fixed in #2570.

You can update to latest by running:

cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked --force

I just ran this to update, confirmed that the installed binary is the latest master commit (Replaced package anchor-cli v0.28.0 ...withanchor-cli v0.28.0 (https://github.com/coral-xyz/anchor#5eb678a8)`). Am getting another workspace-inheritance related error:

Caused by:
  feature `workspace-inheritance` is required

  The package requires the Cargo feature called `workspace-inheritance`, but that feature is not stabilized in this version of Cargo (1.62.1 (6177f0d0d 2022-08-01)).
  Consider adding `cargo-features = ["workspace-inheritance"]` to the top of Cargo.toml (above the [package] table) to tell Cargo you are opting in to use this unstable feature.
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#workspace-inheritance for more information about the status of this feature.

Somehow anchor is using Cargo 1.62.1 even though I have 1.71 installed and a rust-toolchain.toml that specifies the toolchain vers

EDIT: nvm i think its a cargo-build-bpf (which is deprecated btw) problem: solana-labs/solana#31337

@acheroncrypto
Copy link
Collaborator

acheroncrypto commented Jul 26, 2023

Somehow anchor is using Cargo 1.62.1 even though I have 1.71 installed and a rust-toolchain.toml that specifies the toolchain vers

It's not about Anchor: solana-labs/solana#31428

EDIT: nvm i think its a cargo-build-bpf (which is deprecated btw) problem: solana-labs/solana#31337

Yes, 1.14 CLI uses rustc 1.62.0-dev by default which is before workspace inheritence feature was stabilized in 1.64. It also wouldn't matter whether you use cargo-build-bpf or cargo-build-sbf. You either need to manually update the build tools yourself or upgrade to 1.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants