-
Notifications
You must be signed in to change notification settings - Fork 27
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
draft: build parachain on missing local binaries #207
Conversation
0e5f0a8
to
9687770
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try to run it without building it i am getting an error:
┌ Pop CLI : Building your parachain
│
Error: No such file or directory (os error 2)
I think is because of the path you are sending to the build_parachain
function is incorrect.
The steps to replicate the error are:
pop new parachain my-parachain
cd my-parachain
pop up parachain -f network.toml
Also the CI is failing here: https://github.com/r0gue-io/pop-cli/actions/runs/9517887250/job/26237462632?pr=207 , run cargo fmt --all
to fix it
let local: Vec<_> = missing.iter().filter(|(_, _, local)| *local).collect(); | ||
if local.len() > 0 { | ||
|
||
for (name, binary, _) in local.iter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a warning binary is not used.
.black() | ||
.on_magenta() | ||
))?; | ||
let _ = build_parachain(&Some(PathBuf::from(name.clone())))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for .clone()
here
.black() | ||
.on_magenta() | ||
))?; | ||
let _ = build_parachain(&Some(PathBuf::from(name.clone())))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for let _
if you use ?
after build_parachain
if local.len() > 0 { | ||
|
||
for (name, binary, _) in local.iter() { | ||
intro(format!("{}: Building your parachain", style(" Pop CLI ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep consistency with the funcionality we have in Contracts, can you add a warning message too? like the one you added for contracts?
log::warning(format!("NOTE: contract has not yet been built."))?;
While trying to spin up a substrate node using
pop up parachain
, the command will fail if the node has not been built/compiled already usingpop build parachain
.This PR will automatically check if there is a build/binary existing for the node and then allow
pop up...
to progress.