Skip to content

Upgrade to SNAFU 0.9#27

Merged
webern merged 1 commit into
webern:mainfrom
shepmaster:snafu-0.9
Mar 3, 2026
Merged

Upgrade to SNAFU 0.9#27
webern merged 1 commit into
webern:mainfrom
shepmaster:snafu-0.9

Conversation

@shepmaster
Copy link
Copy Markdown
Contributor

Thanks for using SNAFU! I've just released version 0.9 and my tests caught that your crate would be affected by some of the SemVer-incompatible changes in this version. See the CHANGELOG for a full list.

This commit tries to make the minimal amount of changes to get your code compiling again, but it's entirely possible that there are better solutions for your specific case.

This version also updates the minimum supported Rust version to Rust 1.65 and targets Rust 1.81 by default. I didn't check how these changes affect might your crate, so please make sure to use your judgment as well!

Please feel free to take this PR in whatever form is useful to you; I'm not interested in becoming a long-term contributor to your project, so I'd prefer to not learn your project-specific rules or sign anything like a CLA. I don't mind someone with project approval yoinking these changes and committing it themselves and side-stepping all the red tape.

Thanks for using SNAFU! I've just released version 0.9 and my tests
caught that your crate would be affected by some of the
SemVer-incompatible changes in this version. See the [CHANGELOG][] for
a full list.

This commit tries to make the minimal amount of changes to get your
code compiling again, but it's entirely possible that there are better
solutions for your specific case.

This version also updates the minimum supported Rust version to Rust
1.65 and targets Rust 1.81 by default. I didn't check how these
changes affect might your crate, so please make sure to use your
judgment as well!

Please feel free to take this PR in whatever form is useful to you;
I'm not interested in becoming a long-term contributor to your
project, so I'd prefer to not learn your project-specific rules or
sign anything like a CLA. I don't mind someone with project approval
yoinking these changes and committing it themselves and side-stepping
all the red tape.

[CHANGELOG]: https://github.com/shepmaster/snafu/blob/main/CHANGELOG.md#090---2026-03-02
@shepmaster
Copy link
Copy Markdown
Contributor Author

I also believe your code could make better use of SNAFU. For example, many errors have a site field which is a String. Instead, consider using a Location and implicit data (warning: these are links to the 0.8 docs as the 0.9 docs haven't finished yet; there's small changes to Location in 0.9).

That should allow you to simplify a few macros, it appears.

@webern
Copy link
Copy Markdown
Owner

webern commented Mar 3, 2026

Thank you for this PR and the tips on those unused features 👍

@webern webern merged commit 255ce04 into webern:main Mar 3, 2026
3 checks passed
@shepmaster shepmaster deleted the snafu-0.9 branch March 3, 2026 21:57
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