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

Release v0.3.9 #864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Release v0.3.9 #864

wants to merge 1 commit into from

Conversation

Urhengulas
Copy link
Member

@Urhengulas Urhengulas commented Sep 12, 2024

This PR prepares the release of defmt v0.3.9 and related crates.

There are two breaking changes, one in defmt-decoder, one in defmt-parser. This does not affect users of the firmware defmt crate, but only of the host-side defmt-decoder crate. The breakage is minimal though. We are adding one new variant to two enums which were not non_exhaustive before and those enums are not returned from a function but are used for configuration.

This release also no longer requires the "unstable" feature from the decoder and parser (the flag remains, but is a no-op). They have been stable for years now (except one accidental breakage).

Crate Old Version New Version Breaking Change Target
defmt 0.3.8 0.3.9 - 🎙️
defmt-macros 0.3.9 0.3.10 - 🎙️
defmt-decoder 0.3.11 0.4.0 💥 🖥️
defmt-parser 0.3.4 0.4.0 💥 🎙️/🖥️
defmt-print 0.3.12 0.3.13 - 🖥️
defmt-semihosting 0.1.0 0.0.0 N/A 🎙️
firmware 0.1.0 0.0.0 N/A 🎙️
qemu-run 0.1.0 0.0.0 N/A 💻
xtask 0.1.0 0.0.0 N/A 💻

@Urhengulas Urhengulas changed the title Release defmt v0.3.9, all others v0.5.0 Release v0.3.9 Sep 12, 2024
@Urhengulas
Copy link
Member Author

Opened probe-rs/probe-rs#2809. Once that is reviewed and considered good I will make the release.

@jonathanpallant
Copy link
Contributor

On my list to look at this week

README.md Outdated Show resolved Hide resolved
@jonathanpallant
Copy link
Contributor

jonathanpallant commented Sep 24, 2024

This PR contains a bunch of substantial changes, as well as the release version number bumps. I'd like to see the substantial changes brought out into a separate PR so they can be tested and reviewed individually.

For example 3ba66f7 requires a change in CI to both build with --locked and without.

b5ed24c also requires a change in CI to actually do the build on the MSRV (be that Rust 1.76 or Ferrocene).

It also needs a rebase after #865

@jonathanpallant
Copy link
Contributor

I tested the radio-app exercises using this new defmt:

diff --git a/nrf52-code/radio-app/Cargo.toml b/nrf52-code/radio-app/Cargo.toml
index 44d2206..52d3e65 100644
--- a/nrf52-code/radio-app/Cargo.toml
+++ b/nrf52-code/radio-app/Cargo.toml
@@ -33,3 +33,7 @@ incremental = false
 lto = "fat"
 opt-level = 3
 overflow-checks = false
+
+[patch.crates-io]
+defmt.git = "https://github.com/knurling-rs/defmt"
+defmt.branch = "release"

followed by

cargo update -p defmt

Everything still seemed to build OK.

@Urhengulas
Copy link
Member Author

Urhengulas commented Nov 6, 2024

Blocked on #883 and #884

@Urhengulas
Copy link
Member Author

This PR contains a bunch of substantial changes, as well as the release version number bumps. I'd like to see the substantial changes brought out into a separate PR so they can be tested and reviewed individually.

All the substantial changes have been split out into separate PRs (#871, #883, #884).

@Urhengulas Urhengulas added the breaking change fix / feature / improvement involves a breaking change and needs to wait until next minor version label Nov 6, 2024
@Urhengulas Urhengulas marked this pull request as ready for review November 6, 2024 16:35
@Urhengulas
Copy link
Member Author

This is ready for review and release. As soon as you approve, @jonathanpallant, I will release the crates. Then we can update the probe-rs PR to use the crates-io version.

CHANGELOG.md Outdated Show resolved Hide resolved
@jonathanpallant
Copy link
Contributor

I think this is OK, but I want to go and manually run cargo semver-checks on each thing we're releasing so I fully understand what we're changing here.

@Urhengulas
Copy link
Member Author

Urhengulas commented Nov 8, 2024

cargo semver-checks report

main branch

$ cargo semver-checks -p defmt-parser -p defmt-decoder --features unstable
     Parsing defmt-decoder v0.3.11 (current)
      Parsed [   9.142s] (current)
     Parsing defmt-decoder v0.3.11 (baseline)
      Parsed [   8.841s] (baseline)
    Checking defmt-decoder v0.3.11 -> v0.3.11 (no change)
     Checked [   0.015s] 94 checks: 93 pass, 1 fail, 0 warn, 0 skip

--- failure enum_marked_non_exhaustive: enum marked #[non_exhaustive] ---

Description:
A public enum has been marked #[non_exhaustive]. Pattern-matching on it outside of its crate must now include a wildcard pattern like `_`, or it will fail to compile.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#attr-adding-non-exhaustive
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/enum_marked_non_exhaustive.ron

Failed in:
  enum FormatterFormat in /home/urhengulas/Documents/github.com/knurling-rs/defmt/decoder/src/log/format/mod.rs:276

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  18.016s] defmt-decoder
     Parsing defmt-parser v0.3.4 (current)
      Parsed [   0.816s] (current)
     Parsing defmt-parser v0.3.4 (baseline, cached)
      Parsed [   0.184s] (baseline)
    Checking defmt-parser v0.3.4 -> v0.3.4 (no change)
     Checked [   0.010s] 94 checks: 93 pass, 1 fail, 0 warn, 0 skip

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/enum_variant_added.ron

Failed in:
  variant DisplayHint:Octal in /home/urhengulas/Documents/github.com/knurling-rs/defmt/parser/src/display_hint.rs:16

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [   1.022s] defmt-parser
$ cargo semver-checks -p defmt-print -p defmt-macros
error: no crates with library targets selected, nothing to semver-check
note: only library targets contain an API surface that can be checked for semver
note: skipped the following crates since they have no library target: defmt-macros, defmt-print
$ cargo semver-checks -p defmt --default-features
     Parsing defmt v0.3.8 (current)
      Parsed [   1.143s] (current)
     Parsing defmt v0.3.8 (baseline, cached)
      Parsed [   0.106s] (baseline)
    Checking defmt v0.3.8 -> v0.3.8 (no change)
     Checked [   0.009s] 94 checks: 94 pass, 0 skip
     Summary no semver update required
    Finished [   1.268s] defmt

release branch

$ cargo semver-checks -p defmt-parser -p defmt-decoder --features unstable
     Parsing defmt-decoder v0.4.0 (current)
      Parsed [   9.571s] (current)
     Parsing defmt-decoder v0.3.11 (baseline, cached)
      Parsed [   0.185s] (baseline)
    Checking defmt-decoder v0.3.11 -> v0.4.0 (major change)
     Checked [   0.000s] 0 checks: 0 pass, 94 skip
     Summary no semver update required
    Finished [   9.774s] defmt-decoder
     Parsing defmt-parser v0.4.0 (current)
      Parsed [   0.900s] (current)
     Parsing defmt-parser v0.3.4 (baseline, cached)
      Parsed [   0.250s] (baseline)
    Checking defmt-parser v0.3.4 -> v0.4.0 (major change)
     Checked [   0.000s] 0 checks: 0 pass, 94 skip
     Summary no semver update required
    Finished [   1.163s] defmt-parser
$ cargo semver-checks -p defmt-print -p defmt-macros
error: no crates with library targets selected, nothing to semver-check
note: only library targets contain an API surface that can be checked for semver
note: skipped the following crates since they have no library target: defmt-macros, defmt-print
$ cargo semver-checks -p defmt --default-features
     Parsing defmt v0.3.9 (current)
      Parsed [   3.164s] (current)
     Parsing defmt v0.3.8 (baseline, cached)
      Parsed [   0.196s] (baseline)
    Checking defmt v0.3.8 -> v0.3.9 (minor change)
     Checked [   0.007s] 87 checks: 87 pass, 7 skip
     Summary no semver update required
    Finished [   3.378s] defmt

@jonathanpallant
Copy link
Contributor

That looks good for "defmt-parser" and "defmt-decoder" on the host side. What about "defmt-print" on the host side and "defmt" on the target side? I think that's all four things you're proposing to publish here?

@Urhengulas
Copy link
Member Author

What about "defmt-print" on the host side and "defmt" on the target side? I think that's all four things you're proposing to publish here?

There are no conflicts on the main branch already. So there are no conflicts in the release branch as well. I didn't include the output for brevity, as it is the same, but just added it for completeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change fix / feature / improvement involves a breaking change and needs to wait until next minor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants