esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
455 stars 110 forks source link

Unify configuration methods #551

Closed SergioGasquez closed 5 months ago

SergioGasquez commented 5 months ago
MabezDev commented 5 months ago
/.config/espflash.toml

What's the rationale around having it inside <current_dir>/.config, instead of <current_dir>? It doesn't matter much to me, but I just wonder if there is a particular reason. Most other tools with configs, namely probe-rs (cargo embed) place there configuration files in the root of the project.

SergioGasquez commented 5 months ago

What's the rationale around having it inside <current_dir>/.config, instead of <current_dir>? It doesn't matter much to me, but I just wonder if there is a particular reason. Most other tools with configs, namely probe-rs (cargo embed) place there configuration files in the root of the project.

Tbh, I just followed the suggestion in https://github.com/esp-rs/espflash/issues/469, I can update the path to be <current_dir>

MabezDev commented 5 months ago

imo it should probably be in the current directory, but I'll let @jessebraham @bjoernQ and @JurajSadel weigh in too.

SergioGasquez commented 5 months ago

imo it should probably be in the current directory, but I'll let @jessebraham @bjoernQ and @JurajSadel weigh in too.

Awesome, let's hear their opinion, I am happy to change it with whatever we decide

bjoernQ commented 5 months ago

I think I would prefer the current directory

jessebraham commented 5 months ago

Sorry if I've missed something, why was the Cargo package metadata loading in cargo-espflash crippled? What's the point of even having it in its current rendition?

SergioGasquez commented 5 months ago

Sorry if I've missed something, why was the Cargo package metadata loading in cargo-espflash crippled? What's the point of even having it in its current rendition?

I'd say we can remove the Cargo metadata, as it is now in the config file and its the same for espflash/cargo-espflash

jessebraham commented 5 months ago

That's disappointing, I use it in most of my projects :/ Guess I will switch over, thanks.

SergioGasquez commented 5 months ago

That's disappointing, I use it in most of my projects :/ Guess I will switch over, thanks.

I mean, we can keep it. No hard opinion there, but then we would have multiple ways of defining those configs.

SergioGasquez commented 5 months ago

I updated the local config to live under <current_dir>/espflash.toml, removed the format param from cargo metadata for cargo-espflash and udpated the docs