feat: ensure at least one stable version is offered AND feat: add debug logging #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves gh-92.
If patch 2 is not desired, this PR can either be amended to omit it,
or patch 1 can be cherry-picked and merged independently.
I recommend reviewing the included commits independently.
Summer Tea (2):
feat: ensure at least one stable version is offered
feat: add debug logging
Cargo.lock | 107 +++++++++++++++++++++++++++++++++++++++++++++++++---
Cargo.toml | 2 +
src/main.rs | 58 +++++++++++++++++++++++++++-
3 files changed, 159 insertions(+), 8 deletions(-)
[PATCH 1/2] feat: ensure at least one stable version is offered
Previously, PineFlash would fetch the three latest version of IronOS
from GitHub, irrespective of the prerelease status of those versions.
This meant that PineFlash would only offer unstable versions if there
were three or more prereleases for the upcoming version.
As of 2025-03-03, PineFlash only offers:
This patch implements the following rules for choosing which versions of
IronOS to offer to the user:
be offered
With this patch, PineFlash instead offers the following versions on 2025-03-03:
Resolves: #92
---
src/main.rs | 42 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
[PATCH 2/2] feat: add debug logging
This patch adds debug logging to PineFlash, to aid with debugging and
creating bug reports.
This commit is dependant on aaa771b, as it includes logging specific to
that patch.
This patch adds
env_loggeras a dependency; however,logwas alreadya transitive dependency, and this patch will expose the logging
functionality of dependencies automatically.
This patch adds some initial debug and trace logging statements to
PineFlash itself (specifically building on aaa771b), and opens the door
for future contributions to also include useful diagnostic and
informational log messages.
It also exposes the logging functionality of dependencies.
INFO (or higher) messages from dependencies will be now be printed
automatically, and running PineFlash with the environment variable
RUST_LOG=debugorRUST_LOG=traceset will already print manypotentially useful diagnostic messages from dependencies.
The goal of this patch is to introduce new tools to aid in debugging,
and allow contributors to polish hasty println!() debugging into
reusable diagnostic messages where useful, rather than simply deleting
it to be recreated when needed again.
Related-to: #92
---
Cargo.lock | 107 +++++++++++++++++++++++++++++++++++++++++++++++++---
Cargo.toml | 2 +
src/main.rs | 16 ++++++++
3 files changed, 119 insertions(+), 6 deletions(-)