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

fix: add frame-support-procedural #11

Open
wants to merge 2 commits into
base: daan/feat-assets
Choose a base branch
from

Conversation

chungquantin
Copy link
Collaborator

Without the dependency, got an error with frame-support when run cargo test --release on the example contract:

error[E0433]: failed to resolve: could not find `try_runtime_enabled` in `frame_support`
   --> /Users/chungquantin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-system-36.1.0/src/lib.rs:257:1
    |
257 | #[frame_support::pallet]
    | ^^^^^^^^^^^^^^^^^^^^^^^^ could not find `try_runtime_enabled` in `frame_support`
    |
    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `try_runtime_enabled` in `frame_support`
   --> /Users/chungquantin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-system-36.1.0/src/lib.rs:634:12
    |
634 |     #[pallet::hooks]
    |               ^^^^^ could not find `try_runtime_enabled` in `frame_support`

How to reproduce?

Remove the Cargo.lock (if you have that for the example contract) and run cargo test --release on the example contract.

@chungquantin chungquantin added the bug Something isn't working label Sep 30, 2024
@chungquantin chungquantin changed the base branch from daan/refactor-repo_structure to daan/feat-assets September 30, 2024 04:38
@zjb0807
Copy link

zjb0807 commented Oct 1, 2024

cargo update -p frame-support-procedural --precise 30.0.1 can fix the error.

@chungquantin
Copy link
Collaborator Author

@zjb0807 Yes that is what this PR does.

@zjb0807
Copy link

zjb0807 commented Oct 1, 2024

@zjb0807 Yes that is what this PR does.

I means this:

rm Cargo.lock
cargo test --release

cargo update -p frame-support-procedural --precise 30.0.1
cargo test --release

only update the Cargo.lock will fix the error.

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

Successfully merging this pull request may close these issues.

2 participants