Conversation
…ced non existent features
|
/cmd prdoc --audience runtime_dev --bump patch |
|
| //! ## Docs structure | ||
| #![doc = simple_mermaid::mermaid!("../mermaid/structure.mmd")] | ||
| // Frame macros reference features which this crate does not have | ||
| #![allow(unexpected_cfgs)] |
There was a problem hiding this comment.
We should create an issue for this
There was a problem hiding this comment.
You want to eventually add those features to those crates? Because I thought we just want to allow it forever. Cause the features are essentially useless in those crates. I which you could selectively suppress the warnings.
There was a problem hiding this comment.
The macros should not require these features. For that we have this which enables code, based on features being enabled in the frame-support crate. (The correct way to handle this)
Ooof. Thank you for your service. |
Ref paritytech/ci_cd#1107 We mainly need that so that we can finally compile the `pallet_revive` fixtures on stable. I did my best to keep the commits focused on one thing to make review easier. All the changes are needed because rustc introduced more warnings or is more strict about existing ones. Most of the stuff could just be fixed and the commits should be pretty self explanatory. However, there are a few this that are notable: A lot of runtimes to write `impl` blocks inside functions. This makes sense to reduce the amount of conditional compilation. I guess I could have moved them into a module instead. But I think allowing it here makes sense to avoid the code churn. The FRAME macros emit code that references various features like `std`, `runtime-benchmarks` or `try-runtime`. If a create that uses those macros does not have those features we get this warning. Those were mostly when defining a `mock` runtime. I opted for silencing the warning in this case rather than adding not needed features. For the benchmarking ui tests I opted for adding the `runtime-benchmark` feature to the `Cargo.toml`. I am bumping the `trybuild` version and regenerating the ui tests. The old version seems to be incompatible. This requires us to pass `deny_warnings` in `CARGO_ENCODED_RUSTFLAGS` as `RUSTFLAGS` is ignored in the new version. This is no longer needed since the latest stable will compile them fine using the `RUSTC_BOOTSTRAP=1`. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Ref https://github.com/paritytech/ci_cd/issues/1107
We mainly need that so that we can finally compile the
pallet_revivefixtures on stable. I did my best to keep the commits focused on one thing to make review easier.All the changes are needed because rustc introduced more warnings or is more strict about existing ones. Most of the stuff could just be fixed and the commits should be pretty self explanatory. However, there are a few this that are notable:
non_local_definitionsA lot of runtimes to write
implblocks inside functions. This makes sense to reduce the amount of conditional compilation. I guess I could have moved them into a module instead. But I think allowing it here makes sense to avoid the code churn.unexpected_cfgsThe FRAME macros emit code that references various features like
std,runtime-benchmarksortry-runtime. If a create that uses those macros does not have those features we get this warning. Those were mostly when defining amockruntime. I opted for silencing the warning in this case rather than adding not needed features.For the benchmarking ui tests I opted for adding the
runtime-benchmarkfeature to theCargo.toml.Failing UI test
I am bumping the
trybuildversion and regenerating the ui tests. The old version seems to be incompatible. This requires us to passdeny_warningsinCARGO_ENCODED_RUSTFLAGSasRUSTFLAGSis ignored in the new version.Removing toolchain file from the pallet revive fixtures
This is no longer needed since the latest stable will compile them fine using the
RUSTC_BOOTSTRAP=1.