Skip to content

Conversation

@tsenovilla
Copy link
Collaborator

@tsenovilla tsenovilla commented Oct 21, 2025

Closes:

This PR will:

  • Allow use pop build spec on CIs (eg, Paseo) by letting the user pass the runtime dir path as argument. This wasn't possible before as find_runtime_dir automatically prompts the user if there's not a "runtime" folder on the call path (which is the case for Paseo) <- This isn't nice for CIs.
  • Allow specifying name and Id in the generated chain spec.
  • Get rid of find_workspace_toml function as it's not correctly supporting not prefixed inputs like "system-chains/bridge-hub-paseo". I detected this a while ago when I was working on feat: new command pop add pallet #524 and added a fixed version to this crate, which was gonna be added to Pop-CLI on that PR. Let's add it now and also leverage we have it to get rid of add_crate_to_workspace, reducing pop codebase's size.

@tsenovilla
Copy link
Collaborator Author

tsenovilla commented Oct 22, 2025

Tried functionality on Paseo with:

pop build spec \
--profile release \
--name "Paseo Bridge Hub Local" \
--id "paseo-bridge-hub-local" \
--para-id 1002 \
--type local \
--relay paseo-local \
--protocol-id bh-pas \
--default-bootnode=false \
--genesis-code=true \
--genesis-state=true \
--deterministic=false \
--properties ss58Format=0,tokenDecimals=10,tokenSymbol=PAS \
--chain local_testnet \
--runtime system-parachains/bridge-hub-paseo \
--output ./chain-specs/local/new_spec.json

and compared the generated raw file with the old one. It looks super good, just one thing caught my attention:

  • The added properties are always strings, so for example "decimals":10 became "decimals":"10". After investigating a bit if this might be problematic I found out that it's OK, so don't need to update that on POP.

We should be able to include this on Paseo workflows soon ;)

@tsenovilla tsenovilla linked an issue Oct 22, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 80.14981% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.84%. Comparing base (d1fd257) to head (415ef4d).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-cli/src/common/builds.rs 76.00% 8 Missing and 10 partials ⚠️
crates/pop-cli/src/commands/build/spec.rs 77.92% 16 Missing and 1 partial ⚠️
crates/pop-chains/src/build/mod.rs 87.25% 8 Missing and 5 partials ⚠️
crates/pop-cli/src/commands/new/contract.rs 0.00% 1 Missing and 1 partial ⚠️
crates/pop-cli/src/commands/build/chain.rs 80.00% 1 Missing ⚠️
crates/pop-cli/src/commands/new/pallet.rs 50.00% 1 Missing ⚠️
crates/pop-cli/src/commands/up/rollup.rs 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
- Coverage   76.95%   76.84%   -0.11%     
==========================================
  Files         109      109              
  Lines       24609    24549      -60     
  Branches    24609    24549      -60     
==========================================
- Hits        18937    18865      -72     
- Misses       3690     3695       +5     
- Partials     1982     1989       +7     
Files with missing lines Coverage Δ
crates/pop-cli/src/commands/build/runtime.rs 70.83% <100.00%> (ø)
crates/pop-common/src/helpers.rs 87.71% <ø> (-4.15%) ⬇️
crates/pop-common/src/lib.rs 83.82% <ø> (ø)
crates/pop-common/src/manifest.rs 93.38% <100.00%> (-0.88%) ⬇️
crates/pop-cli/src/commands/build/chain.rs 73.12% <80.00%> (+0.68%) ⬆️
crates/pop-cli/src/commands/new/pallet.rs 79.87% <50.00%> (-0.13%) ⬇️
crates/pop-cli/src/commands/up/rollup.rs 69.45% <0.00%> (ø)
crates/pop-cli/src/commands/new/contract.rs 82.50% <0.00%> (ø)
crates/pop-chains/src/build/mod.rs 84.87% <87.25%> (+1.16%) ⬆️
crates/pop-cli/src/commands/build/spec.rs 74.78% <77.92%> (+0.34%) ⬆️
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tsenovilla tsenovilla marked this pull request as ready for review October 22, 2025 12:28
@moliholy
Copy link
Collaborator

Works like a charm!

Many thanks for making this command shine ✨

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Excited to see this in the Paseo CI.
Thanks for the last fixes and nitpicks

@tsenovilla tsenovilla merged commit 3527bf0 into main Oct 22, 2025
19 checks passed
@tsenovilla tsenovilla deleted the fix/allow-chain-spec-builder-to-specify-runtime-dir-as-command branch October 22, 2025 17:04
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 this pull request may close these issues.

fix: Improve some missing cases with pop build spec

4 participants