Follow up for: Use the umbrella crate for the parachain template #5993#7464
Follow up for: Use the umbrella crate for the parachain template #5993#7464
Conversation
Will take another look when the PR is ready for review
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
The node crate still fails to build because an error is raised here during the compilation, when the macro is expanded: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/tracing/proc-macro/src/lib.rs#L123. I would attempt a fix in |
|
Maybe I can try it out instead, we can discuss of what and how, that way, we try it out, and I learn something, 2 birds one stone ;) |
|
Just posting the code change and the file. It successfully builds now. let crate_name = match crate_name("sc-tracing") {
Ok(FoundCrate::Itself) => Ident::new("sc_tracing", Span::call_site()),
Ok(FoundCrate::Name(crate_name)) => Ident::new(&crate_name, Span::call_site()),
Err(_) => match crate_name("polkadot-sdk") {
Ok(FoundCrate::Itself) | Ok(FoundCrate::Name(_)) =>
Ident::new("sc_tracing", Span::call_site()),
Err(_) => return Error::new(Span::call_site(), "Neither one of `sc-tracing` or `polkadot-sdk` hasn't been found in your dependencies, or no `polkadot-sdk`'s enabled feature pulls in `sc-tracing`.").to_compile_error().into(),
},
}; |
serban300
left a comment
There was a problem hiding this comment.
Just left a nit. Otherwise looks good
| /// Resolve the correct path for sc_tracing: | ||
| /// - If `polkadot-sdk` is in scope, returns a Path corresponding to `polkadot_sdk::sc_tracing` | ||
| /// - Otherwise, falls back to `sc_tracing` | ||
| pub fn resolve_sc_tracing() -> Result<Path> { |
There was a problem hiding this comment.
I don't think we need to put this logic in a separate function and file if we don't need to reuse it.
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
/cmd fmt |
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* master: (58 commits) Upgrade link-checker cache to v4 (#7874) Updating readmes (#7950) Cumulus: Remove some old scripts (#7946) pallet-bounties: allow bounties to never expire (#7723) run frame-omni-bencher overhead command in CI for all runtimes in the runtime matrix (#7459) Update README.md for Cumulus (#7930) FRAME: Meta Transaction (#6428) Follow up for: Use the umbrella crate for the parachain template #5993 (#7464) Add an extra_constant to pallet-treasury (#7918) Bump the ci_dependencies group across 1 directory with 4 updates (#7855) remove compromised action (#7934) Fixing token-economics dead link (#5302) [pallet-revive] Fix pallet-revive-fixtures build.rs (#7928) cumulus: fix pov exporter format (#7923) sp-api: Support `mut` in `impl_runtime_apis!` (#7924) Remove clones from block seal function (#7917) [pallet-revive] precompiles 2->9 (#7810) Use non-native token to benchmark xcm on asset hub (#7893) [CI] bump timeout wait for build in zombienet workflows. (#7871) taplo: split long array line to multiline array (#7905) ...
#7464) Resolving sc-tracing not being resolved when imported through the polkadot sdk --------- Signed-off-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Serban Iorga <serban@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
# Description We made changes to `sc-tracing-proc-macro` in #7464 which weren't carried to the prdoc, so once stable2503 got released there wasn't a bump for `sc-tracing-proc-macro`, and now it is needed for updating `parachain-template` repo to 2503. It seems that the prdoc check did not catch the missing required bump (it might be because the change was in a `proc-macro` crate). ## Integration N/A ## Review Notes Planning to update stable2503 prdocs retroactively (so the change itself doesn't count for next patch release), and we should request either way a force bump for the following crates: 1. `sc-tracing-proc-macro` 2. `sc-tracing` (depends on 1.) 3. `polkadot-sdk` (depends on 1. & 2.) Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
# Description We made changes to `sc-tracing-proc-macro` in #7464 which weren't carried to the prdoc, so once stable2503 got released there wasn't a bump for `sc-tracing-proc-macro`, and now it is needed for updating `parachain-template` repo to 2503. It seems that the prdoc check did not catch the missing required bump (it might be because the change was in a `proc-macro` crate). ## Integration N/A ## Review Notes Planning to update stable2503 prdocs retroactively (so the change itself doesn't count for next patch release), and we should request either way a force bump for the following crates: 1. `sc-tracing-proc-macro` 2. `sc-tracing` (depends on 1.) 3. `polkadot-sdk` (depends on 1. & 2.) Signed-off-by: Iulian Barbu <iulian.barbu@parity.io> (cherry picked from commit ade1b9c)
…ch#8276) # Description We made changes to `sc-tracing-proc-macro` in paritytech#7464 which weren't carried to the prdoc, so once stable2503 got released there wasn't a bump for `sc-tracing-proc-macro`, and now it is needed for updating `parachain-template` repo to 2503. It seems that the prdoc check did not catch the missing required bump (it might be because the change was in a `proc-macro` crate). ## Integration N/A ## Review Notes Planning to update stable2503 prdocs retroactively (so the change itself doesn't count for next patch release), and we should request either way a force bump for the following crates: 1. `sc-tracing-proc-macro` 2. `sc-tracing` (depends on 1.) 3. `polkadot-sdk` (depends on 1. & 2.) Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
# Description We made changes to `sc-tracing-proc-macro` in #7464 which weren't carried to the prdoc, so once stable2503 got released there wasn't a bump for `sc-tracing-proc-macro`, and now it is needed for updating `parachain-template` repo to 2503. It seems that the prdoc check did not catch the missing required bump (it might be because the change was in a `proc-macro` crate). ## Integration N/A ## Review Notes Planning to update stable2503 prdocs retroactively (so the change itself doesn't count for next patch release), and we should request either way a force bump for the following crates: 1. `sc-tracing-proc-macro` 2. `sc-tracing` (depends on 1.) 3. `polkadot-sdk` (depends on 1. & 2.) Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Resolving sc-tracing not being resolved when imported through the polkadot sdk