Skip to content

Conversation

@acuteaangle
Copy link
Contributor

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:

  • v2.23-rc3
  • v2.23-rc2
  • v2.23-rc1

This patch implements the following rules for choosing which versions of
IronOS to offer to the user:

  • Releases marked as 'draft' on GitHub must never be offered
  • At least one stable version must always be offered
  • Prereleases of versions that have since been fully released should not
    be offered

With this patch, PineFlash instead offers the following versions on 2025-03-03:

  • v2.23-rc3
  • v2.23-rc2
  • v2.22

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_logger as a dependency; however, log was already
a 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=debug or RUST_LOG=trace set will already print many
potentially 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(-)

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:
- v2.23-rc3
- v2.23-rc2
- v2.23-rc1

This patch implements the following rules for choosing which versions of
IronOS to offer to the user:
- Releases marked as 'draft' on GitHub must never be offered
- At least one stable version must always be offered
- Prereleases of versions that have since been fully released should not
  be offered

With this patch, PineFlash instead offers the following versions on 2025-03-03:
- v2.23-rc3
- v2.23-rc2
- v2.22

Resolves: Spagett1gh-92
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_logger` as a dependency; however, `log` was already
a 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=debug` or `RUST_LOG=trace` set will already print many
potentially 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: Spagett1gh-92
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.

pineflash only proposes unstable versions

1 participant