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

[chore] Update golden files for FFI invalid handle tests #346

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scovich
Copy link
Collaborator

@scovich scovich commented Sep 19, 2024

At some point a compiler upgrade started producing more verbose diagnostics, but golden files were never updated to match. Update them now.

@scovich scovich changed the title [chore] Update invalid handle test golden files [chore] Update golden files for FFI invalid handle tests Sep 19, 2024
Copy link
Collaborator

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

lgtm but wondering if this really means we can only support the latest rustc with this sort of error message testing? Ideally I think we would want to have an MSRV that's somewhat old but that would mean all these error would change?

@zachschuermann
Copy link
Collaborator

looks like tests/invalid-handle-code/mut-clone-handle.rs still doesn't match?

@scovich
Copy link
Collaborator Author

scovich commented Sep 19, 2024

looks like tests/invalid-handle-code/mut-clone-handle.rs still doesn't match?

Depends on the compiler version, methinks. @zachschuermann has a good point.
Maybe we somehow need golden files that map to specific compiler versions?

Or maybe we just run once in a while like this, because they're anyway only verifying that the compiler blocks users attempting Bad Things. Even if the compiler ever failed to block them, they're still doing it wrong and should stop.

@zachschuermann
Copy link
Collaborator

@scovich yea maybe the simplest thing for now is to try to freeze the golden file tests to run against a specific version of rustc? wonder if that's possible

@zachschuermann
Copy link
Collaborator

strawman for now: can we just pin the rustc version only for these tests?

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.

4 participants