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

feat: add --no-default-features flag #647

Merged

Conversation

etiennetremel
Copy link
Contributor

@etiennetremel etiennetremel commented Jun 13, 2024

Default features are still included while using the following command:

cargo espflash flash --release --features one,two

This PR add the --no-default-features flag to mirror cargo features functionalities.

Close #645

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, changes LGTM! Just one minor suggestion in the changelog. Do you mind elaborating, how do you tested these changes?

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
@etiennetremel
Copy link
Contributor Author

Thanks for the PR, changes LGTM! Just one minor suggestion in the changelog. Do you mind elaborating, how do you tested these changes?

I tested it manually by compiling the cargo-esflash binary and flashing my home sensor project onto a esp32 dev board: https://github.com/etiennetremel/esp32-home-sensor.

Not sure if this is the right thing to do, but the project make use of Cargo features to enable/disable sensors during compile time.

For example, if I want to connect 2 sensors to the dev board (in this case sds011 and bme280), I can use the following command:

../../esp-rs/espflash/target/release/cargo-espflash espflash flash --release --no-default-features --features sds011,bme280

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

LGTM! Sorry, I completely forgot this PR.

@SergioGasquez SergioGasquez merged commit 44ba4d4 into esp-rs:main Jul 1, 2024
28 checks passed
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.

Add support for --no-default-features
2 participants