Skip to content

Conversation

@g0hl1n
Copy link
Contributor

@g0hl1n g0hl1n commented Oct 20, 2025

Summary

globset v0.4.17 changed its rust edition from 2021 to 2024. As insta is currently on edition 2021 ensure to use globset versions <0.4.17.

References

globset v0.4.17 bumped to rust edition 2024. As insta is currently on
edition 2021 ensure to use globset versions <0.4.17.

Link: BurntSushi/ripgrep@a60e62d
Link: BurntSushi/ripgrep#3149
Signed-off-by: Richard Leitner <dev@g0hl1n.net>
@max-sixty
Copy link
Collaborator

isn't default cargo behavior to allow any patch version?

what's the observable bad outcome with the existing command?

@g0hl1n
Copy link
Contributor Author

g0hl1n commented Oct 20, 2025

isn't default cargo behavior to allow any patch version?

Exactly. That's the problem IMHO. insta is in this case allowing a dependency which doesn't matches its rust edition.

what's the observable bad outcome with the existing command?

The problem shows when compiling with a rust toolchain which supports only edition 2021, but doesn't support 2024 (as you do if you build using YoctoProject/OpenEmbedded walnascar for example). If globset is updated via cargo update it's bumped to 0.4.17. But then the project fails to compile as the compiler doesn't support the rust edition of globset.

IMHO the "root cause" is having globset changing its rust edition in a bugfix release (which shouldn't happen if you adhere to SemVer). But as it seems this is somehow a "policy" of ripgrep/globset the only solution would be to either limit the maximum supported globset version or bump the rust edition of insta.

Or have I missed/misinterpreted something?

@max-sixty
Copy link
Collaborator

but crates can compile with different editions IIUC?

can we see a reproducible example of an error?

@g0hl1n
Copy link
Contributor Author

g0hl1n commented Oct 21, 2025

Sure. Here's the message from the cargo build triggered by bitbake:

| Caused by:
|   failed to parse manifest at `/path/to/build/tmp/work/cortexa53-crypto-poky-linux/project/2025.272.0/sources-unpack/cargo_home/bitbake/globset-0.4.17/Cargo.toml`
|
| Caused by:
|   feature `edition2024` is required
|
|   The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.84.0 (66221abde 2024-11-19)).
|   Consider trying a more recent nightly release.
|   See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.

@max-sixty
Copy link
Collaborator

OK yes; I think there's some disagreement in the rust community re whether to do this in libraries vs apps, but no downside on merging this

and the MSRV resolver will solve everything when we're up to that rust version

@max-sixty
Copy link
Collaborator

thank you @g0hl1n !

@max-sixty max-sixty merged commit 53e209f into mitsuhiko:master Oct 21, 2025
15 checks passed
@g0hl1n g0hl1n deleted the fix/globset-rust-edition branch October 21, 2025 20:01
@max-sixty max-sixty mentioned this pull request Nov 20, 2025
max-sixty added a commit that referenced this pull request Nov 20, 2025
## Summary

Prepare for the 1.44.0 release:

- Bump version to 1.44.0 in `insta/Cargo.toml` and
`cargo-insta/Cargo.toml`
- Update CHANGELOG.md with all changes since 1.43.2

## Changes in 1.44.0

- Added non-interactive snapshot review and reject modes for use in
non-TTY environments (LLMs, CI pipelines, scripts) #815
- Add `--disable-nextest-doctest` flag with deprecation warning #803
- Add ergonomic `--test-runner-fallback` / `--no-test-runner-fallback`
flags #811
- Apply redactions to snapshot metadata #813
- Remove confusing 'previously unseen snapshot' message #812
- Speed up JSON float rendering #806 (@nyurik)
- Allow globset version up to 0.4.16 #810 (@g0hl1n)
- Improve documentation #814 (@tshepang)
- Enforce starting newlines in assertions #563

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants