-
Notifications
You must be signed in to change notification settings - Fork 76
Compiletest normalization #439
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
base: main
Are you sure you want to change the base?
Conversation
bbb1919
to
065b526
Compare
065b526
to
121a661
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't appear to be a way we can register this as a default with compiletest
and just have a directive like include-file-numbers
to turn them on when needed. But there is -Z ui-testing
, perhaps we can set that in compiletests's Config
https://github.com/Manishearth/compiletest-rs/blob/02b122626320f562914710bada39e637f051c7bb/src/common.rs#L172? do we ever care about the line numbers?
It looks like his might be possible / better in the newer rustc compiletest framework, but I had other issues with it: https://rustc-dev-guide.rust-lang.org/tests/ui.html
@eddyb @nnethercote @FractalFir preferences? (Unfortunately github compare between the branches doesn't actually produce a proper diff, but just shows the diff to the parent commit... so here's a manual sample diff from error: `#[spirv(vector)]` must have 2, 3 or 4 members
- --> $DIR/invalid_vector_type.rs:
- |
- | pub struct FewerFields {
- | ^^^^^^^^^^^^^^^^^^^^^^
+ --> $DIR/invalid_vector_type.rs:8:1
+ |
+LL | pub struct FewerFields {
+ | ^^^^^^^^^^^^^^^^^^^^^^
error: `#[spirv(vector)]` must have 2, 3 or 4 members
- --> $DIR/invalid_vector_type.rs:
- |
- | pub struct TooManyFields {
- | ^^^^^^^^^^^^^^^^^^^^^^^^
+ --> $DIR/invalid_vector_type.rs:13:1
+ |
+LL | pub struct TooManyFields {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[spirv(vector)]` type fields must all be floats, integers or bools
- --> $DIR/invalid_vector_type.rs:
- |
- | pub struct NotVectorField {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: field type is f32x2
+ --> $DIR/invalid_vector_type.rs:22:1
+ |
+LL | pub struct NotVectorField {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: field type is f32x2
error: `#[spirv(vector)]` member types must all be the same
- --> $DIR/invalid_vector_type.rs:
- |
- | pub struct DifferentTypes {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ --> $DIR/invalid_vector_type.rs:34:1
+ |
+LL | pub struct DifferentTypes {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
We may need to modernize our compiletest at some point, but I don't think we should block this PR because of that. I'm mostly waiting for my difftest PR to be reviewed before I'll touch it, so I can immediately integrate the feedback from there. |
Requires #380
To reduce compiletest stderr merge conflicts and reviewing effort:
rust-gpu/tests/compiletests/README.md
Lines 86 to 87 in bbb1919