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

Enable "cargo run --bin substrate-node" #1927

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

pgherveou
Copy link
Contributor

No description provided.

@pgherveou pgherveou added the R0-silent Changes should not be mentioned in any release notes label Oct 18, 2023
@bkchr
Copy link
Member

bkchr commented Oct 18, 2023

So what would cargo run do? Thrown an error as there are multiple packages?

@pgherveou
Copy link
Contributor Author

So what would cargo run do? Thrown an error as there are multiple packages?

It should run polkadot as this is the first binary listed in the 'default-members'
maybe this is a bit silly since you can also cargo run --package node-cli. I guess I had some muscle memory from the substrate repo that I wanted to restore, but I can live with that as well

@bkchr
Copy link
Member

bkchr commented Oct 18, 2023

It should run polkadot as this is the first binary listed in the 'default-members'

Did you tried this or are you guessing?

@pgherveou
Copy link
Contributor Author

It should run polkadot as this is the first binary listed in the 'default-members'

Did you tried this or are you guessing?

Yes confirmed.
if you just specify

default-members = [ "substrate/bin/node/cli" ]

then cargo run will run substrate-node instead

Having both let you use cargo run --bin without specifying -p

Weirdly swapping the two values

default-members = [ "substrate/bin/node/cli", "polkadot" ] 

does not let you run substrate-node via cargo run to run` ¯_(ツ)_/¯

@bkchr
Copy link
Member

bkchr commented Oct 19, 2023

does not let you run substrate-node via cargo run to run` ¯_(ツ)_/¯

Because this is then probably the default. And the other ones just bring their "binary names" into the global scope to use them via -p. Something along these lines.

@pgherveou pgherveou enabled auto-merge (squash) October 27, 2023 12:03
Copy link
Contributor

@franciscoaguirre franciscoaguirre left a comment

Choose a reason for hiding this comment

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

While on the topic, I'd probably request adding cumulus/polkadot-parachain so it can be run simply with --bin polkadot-parachain without specifying -p polkadot-parachain-bin

@ggwpez
Copy link
Member

ggwpez commented Oct 27, 2023

I think it needs a rebase for the required CI check.

@pgherveou pgherveou merged commit 9643a3a into master Oct 27, 2023
105 of 110 checks passed
@pgherveou pgherveou deleted the pg/add-substrate-to-default-members branch October 27, 2023 13:58
@koushiro
Copy link
Contributor

koushiro commented Oct 28, 2023

you could use cargo run --bin substrate-node --workspace instead of adding a new member into default-members

serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 26, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 27, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
…esTarget::reconnect (paritytech#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
bkchr pushed a commit that referenced this pull request Apr 10, 2024
…esTarget::reconnect (#1927)

* reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect

* add issue reference

* fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants