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

Switch from trybuild to ui-test #187

Open
joshlf opened this issue May 27, 2023 · 2 comments
Open

Switch from trybuild to ui-test #187

joshlf opened this issue May 27, 2023 · 2 comments
Labels
compatibility-nonbreaking Changes that are (likely to be) non-breaking

Comments

@joshlf
Copy link
Member

joshlf commented May 27, 2023

See also: #560

The trybuild crate keeps track of expected compiler errors in a separate .stderr file - one .stderr file per .rs file. This makes it difficult to audit updates to these files, which tend to be very cluttered and verbose, and makes issues like #706 / #707 more likely to slip through.

By contrast, the ui-test crate allows annotating expected errors in an inline comment, which is much more readable and thus much less error-prone. It will also make it feasible for us to combine multiple tests in a single file without worrying about it increasing the likelihood of errors slipping through.

@joshlf joshlf added the compatibility-nonbreaking Changes that are (likely to be) non-breaking label Aug 12, 2023
joshlf added a commit that referenced this issue Dec 9, 2023
Previously, some UI tests had missing imports which caused the
corresponding `.stderr` files to be populated with unhelpful "cannot
find ..." messages. This is another point in favor of #187 (switching to
the `ui-test` crate), which presumably would have made it much less
likely for this to slip under the radar.
@joshlf
Copy link
Member Author

joshlf commented Dec 9, 2023

This would likely have prevented #706 / #707.

@joshlf joshlf changed the title Consider switching from trybuild to ui-test Switch from trybuild to ui-test Dec 9, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 9, 2023
Previously, some UI tests had missing imports which caused the
corresponding `.stderr` files to be populated with unhelpful "cannot
find ..." messages. This is another point in favor of #187 (switching to
the `ui-test` crate), which presumably would have made it much less
likely for this to slip under the radar.
@joshlf
Copy link
Member Author

joshlf commented Dec 13, 2023

Another reason to migrate off of trybuild: dtolnay/trybuild#241 is preventing us from implementing a test which would detect a regression of #716.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-nonbreaking Changes that are (likely to be) non-breaking
Projects
None yet
Development

No branches or pull requests

1 participant