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

subalfred check features could output the features in a copy-paste format #268

Closed
insipx opened this issue Nov 2, 2022 · 5 comments
Closed
Labels
Feat Feature

Comments

@insipx
Copy link

insipx commented Nov 2, 2022

it would be a really nice QoL and time-saving measure if subalfred outputted the missing features in a way which would allow someone to just copy-paste into the Cargo.toml file. Could be an option flag or the default. For instance, if I run subalfred check features now, I get the output below. It definitely already saves time over manually checking if the pallet has those features, but it would be even better if I could output it in TOML format already

Output Logs
incomplete `runtime-benchmarks` of `cumulus-pallet-parachain-system`
incomplete `runtime-benchmarks` of `cumulus-pallet-xcmp-queue`
incomplete `runtime-benchmarks` of `efinity-utils`
incomplete `runtime-benchmarks` of `ep-core`
incomplete `runtime-benchmarks` of `frame-support`
incomplete `runtime-benchmarks` of `pallet-assets`
incomplete `runtime-benchmarks` of `pallet-balances`
incomplete `runtime-benchmarks` of `polkadot-xcm`
incomplete `runtime-benchmarks` of `polkadot-parachain`
incomplete `runtime-benchmarks` of `polkadot-runtime`
incomplete `runtime-benchmarks` of `polkadot-runtime-parachains`
incomplete `runtime-benchmarks` of `xcm-builder`
incomplete `runtime-benchmarks` of `xcm-executor`
incomplete `try-runtime` of `cumulus-pallet-dmp-queue`
incomplete `try-runtime` of `cumulus-pallet-parachain-system`
incomplete `try-runtime` of `cumulus-pallet-xcm`
incomplete `try-runtime` of `cumulus-pallet-xcmp-queue`
incomplete `try-runtime` of `frame-system`
incomplete `try-runtime` of `pallet-assets`
incomplete `try-runtime` of `pallet-balances`
incomplete `try-runtime` of `pallet-multi-tokens`
incomplete `try-runtime` of `polkadot-xcm`
incomplete `try-runtime` of `parachain-info`
incomplete `try-runtime` of `polkadot-runtime`
incomplete `try-runtime` of `polkadot-runtime-parachains`
incomplete `std` of `cumulus-pallet-dmp-queue`
incomplete `std` of `cumulus-pallet-parachain-system`
incomplete `std` of `cumulus-pallet-xcm`
incomplete `std` of `cumulus-pallet-xcmp-queue`
incomplete `std` of `cumulus-primitives-core`
incomplete `std` of `efinity-utils`
incomplete `std` of `ep-core`
incomplete `std` of `frame-benchmarking`
incomplete `std` of `log`
incomplete `std` of `pallet-assets`
incomplete `std` of `pallet-balances`
incomplete `std` of `parachain-info`
incomplete `std` of `parachains-common`
incomplete `std` of `polkadot-core-primitives`
incomplete `std` of `polkadot-parachain`
incomplete `std` of `polkadot-runtime`
incomplete `std` of `polkadot-runtime-parachains`
incomplete `std` of `sp-core`
incomplete `std` of `sp-io`
incomplete `std` of `xcm-builder`
incomplete `std` of `xcm-executor`
@aurexav
Copy link
Member

aurexav commented Nov 3, 2022

Thanks for the issue.


It's easy to do this. Even I could add these to your toml directly.

But there is a problem. How do I keep the formatting style?

Different teams might use different formatting rules.

It's a little hard to make the output follow their formatting rules.

@insipx
Copy link
Author

insipx commented Nov 3, 2022

imo formatting isn't a problem -- most developers have auto-format enabled, and it would be up to the developer to format it properly, which isn't too different than how it's implemented now. Ofc someone could use xargs or other unix commands to filter out just the dependencies and copy-paste that way too in the current subalfred version, but something integrated into the cli would be nice too

@aurexav
Copy link
Member

aurexav commented Nov 4, 2022

imo formatting isn't a problem -- most developers have auto-format enabled, and it would be up to the developer to format it properly, which isn't too different than how it's implemented now. Ofc someone could use xargs or other unix commands to filter out just the dependencies and copy-paste that way too in the current subalfred version, but something integrated into the cli would be nice too

AFAIK, there isn't a way(tomlfmt like rustfmt) to format all the toml files under a workspace.

@aurexav aurexav added the Feat Feature label Nov 4, 2022
@aurexav
Copy link
Member

aurexav commented Nov 4, 2022

A note here.

There are 2 situations:

  • Forgot to write default-features = false, and the crate has an std feature enabled by default.
  • Forgot to write crate/std, and the crate's default features were disabled.

@aurexav
Copy link
Member

aurexav commented Jul 27, 2023

@aurexav aurexav closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat Feature
Projects
None yet
Development

No branches or pull requests

2 participants