Skip to content

Update a snapshot in cyclonedx-bom-macros for Rust 1.91 - #810

Closed
musicinmybrain wants to merge 1 commit into
CycloneDX:mainfrom
musicinmybrain:rust-1.91-snaps
Closed

Update a snapshot in cyclonedx-bom-macros for Rust 1.91#810
musicinmybrain wants to merge 1 commit into
CycloneDX:mainfrom
musicinmybrain:rust-1.91-snaps

Conversation

@musicinmybrain

Copy link
Copy Markdown
Contributor

Based on testing in Fedora with Rust 1.91.1, while packaging this as a new dependency for https://github.com/astral-sh/uv.

Signed-off-by: Benjamin A. Beasley <code@musicinmybrain.net>
@musicinmybrain
musicinmybrain requested a review from a team as a code owner December 6, 2025 09:08
@musicinmybrain

Copy link
Copy Markdown
Contributor Author

Hmm. This does make cargo test pass in a git checkout, so it’s probably a correct PR, but I will still have to skip the affected test in a rust-cyclonedx-bom-macros package in Fedora, since (for reasons that I don’t find obvious) the diagnostics in the RPM build environment have some minor whitespace differences. That’s OK, though!

--- expected	2025-12-06 09:14:33.221846240 +0000
+++ actual	2025-12-06 09:14:46.189919528 +0000
@@ -1,7 +1,7 @@
 ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
 error[E0428]: the name `Foo` is defined multiple times
- --> tests/ui/fail/duplicated_struct.rs:10:5
-  |
+  --> tests/ui/fail/duplicated_struct.rs:10:5
+   |
  7 |     pub struct Foo;
    |     --------------- previous definition of the type `Foo` here
 ...

@Shnatsel Shnatsel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the long run we shouldn't depend on the human-readable output, but I'm happy to have a quick fix right now. Thanks!

@Shnatsel Shnatsel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly I don't think this is workable as-is because we run CI both on the minimum supported Rust version and the latest version; I think we need to stop checking for exact match in the output on this test.

@musicinmybrain

Copy link
Copy Markdown
Contributor Author

Sadly I don't think this is workable as-is because we run CI both on the minimum supported Rust version and the latest version; I think we need to stop checking for exact match in the output on this test.

That makes sense. It would be better for me as a downstream packager anyway, since (as described in #810 (comment)) this test still seems to be brittle and sensitive to the surrounding environment even on a particular Rust toolchain version.

@lfrancke

Copy link
Copy Markdown
Contributor

@musicinmybrain Is this something you'd like to provide a PR for? (no pressure, just checking)

@musicinmybrain

Copy link
Copy Markdown
Contributor Author

@musicinmybrain Is this something you'd like to provide a PR for? (no pressure, just checking)

Probably not: since sensitivity to precise compiler output is an idea that is fundamental to trybuild as I understand it, I’m not sure what to suggest.

@Shnatsel

Copy link
Copy Markdown
Contributor

The proper way to fix this is to migrate away from trybuild to something like ui-test which is more flexible and lets us define expected output per Rust version or outright ignore the details of the error message and just check that the build fails.

I've opened #823 to work around this in the short term. Closing in favor of that PR.

@Shnatsel Shnatsel closed this Mar 12, 2026
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.

3 participants