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

make build tests not depend on minutiae of rustc output #3628

Merged

Conversation

zackmdavis
Copy link
Member

This little patch arises from the maelstrom of my purity born of pain.

It's the pain of seeing rust-lang/rust#38103 in its perfect crystalline beauty waste away on page four of https://github.com/rust-lang/rust/pulls, waiting, ready, itching to land, dying with anticipation to bring the light of clearer lint group error messages to Rust users of all creeds and nations, only for its promise to be cruelly blocked by the fateful, hateful hand of circular dependency. For it is written in src/tools/cargotest/main.rs that the Cargo tests must pass before the PR can receive Appveyor's blessing, but the Cargo tests could not pass (because they depend on fine details of the output that the PR is meant to change), and the Cargo tests could not be changed (because updating the test expectation to match the proposed new compiler output, would fail with the current compiler).

The Gordian knot is cut in the bowels of cargotest's very notion of comparison (of JSON objects) itself, by means of introducing a magic string literal "{...}", which can server as a wildcard for any JSON sub-object.

And so it will be for the children, and the children's children, and unto the 1.17.0 and 1.18.0 releases, that Cargo's build test expectations will faithfully expect the exact JSON output by Cargo itself, but the string literal "{...}" shall be a token upon the JSON output by rustc, and when I see "{...}", I will pass over you, and the failure shall not be upon you.

And this day shall be unto you for a memorial.

supersedes #3513

r? @alexcrichton

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

This looks great to me, thanks! It looks like some branch trickery on master caused this to now have some extra commits, could you rebase those out? After that I'll r+ and merge

@zackmdavis zackmdavis force-pushed the the_maelstrom_of_my_purity_born_of_pain branch 2 times, most recently from 8b5b750 to a2bd8c9 Compare February 1, 2017 18:05
@zackmdavis
Copy link
Member Author

@alexcrichton (rebased)

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Collaborator

bors commented Feb 1, 2017

📌 Commit a2bd8c9 has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Feb 2, 2017

☔ The latest upstream changes (presumably #3609) made this pull request unmergeable. Please resolve the merge conflicts.

@zackmdavis
Copy link
Member Author

goddammit @bors

This little patch arises from the maelstrom of my purity born of pain.

It's the pain of seeing rust-lang/rust#38103 in its perfect
crystalline beauty waste away on page four of
https://github.com/rust-lang/rust/pulls, waiting, ready, itching to
land, dying with anticipation to bring the light of clearer lint group
error messages to Rust users of all creeds and nations, only for its
promise to be cruelly blocked by the fateful, hateful hand of circular
dependency. For it is written in src/tools/cargotest/main.rs that the
Cargo tests must pass before the PR can receive Appveyor's blessing,
but the Cargo tests could not pass (because they depend on fine
details of the output that the PR is meant to change), and the Cargo
tests could not be changed (because updating the test expectation to
match the proposed new compiler output, would fail with the current
compiler).

The Gordian knot is cut in the bowels of cargotest's very notion of
comparison (of JSON objects) itself, by means of introducing a magic
string literal `"{...}"`, which can server as a wildcard for any JSON
sub-object.

And so it will be for the children, and the children's children, and
unto the 1.17.0 and 1.18.0 releases, that Cargo's build test
expectations will faithfully expect the exact JSON output by Cargo
itself, but the string literal `"{...}"` shall be a token upon the
JSON output by rustc, and when I see `"{...}"`, I will pass over you,
and the failure shall not be upon you.

And this day shall be unto you for a memorial.
@zackmdavis
Copy link
Member Author

#3609 added a new test to the end of the file, which "conflicted" with the deletion of the empty line 2771 in my patch owing to my delete-trailing-whitespace save hook.

@zackmdavis zackmdavis force-pushed the the_maelstrom_of_my_purity_born_of_pain branch from a2bd8c9 to 88f6a30 Compare February 2, 2017 04:49
@zackmdavis
Copy link
Member Author

@alexcrichton (rebased again)

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Feb 2, 2017

📌 Commit 88f6a30 has been approved by alexcrichton

@alexcrichton
Copy link
Member

@bors: retry

@alexcrichton alexcrichton changed the title make build tests not depend on minutiæ of rustc output make build tests not depend on minutiae of rustc output Feb 3, 2017
@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Collaborator

bors commented Feb 3, 2017

⌛ Testing commit 88f6a30 with merge 550bd43...

bors added a commit that referenced this pull request Feb 3, 2017
…ain, r=alexcrichton

make build tests not depend on minutiae of rustc output

This little patch arises from the maelstrom of my purity born of pain.

It's the pain of seeing rust-lang/rust#38103 in its perfect crystalline beauty waste away on page four of https://github.com/rust-lang/rust/pulls, waiting, ready, itching to land, dying with anticipation to bring the light of clearer lint group error messages to Rust users of all creeds and nations, only for its promise to be cruelly blocked by the fateful, hateful hand of circular dependency. For it is written in src/tools/cargotest/main.rs that the Cargo tests must pass before the PR can receive Appveyor's blessing, but the Cargo tests could not pass (because they depend on fine details of the output that the PR is meant to change), and the Cargo tests could not be changed (because updating the test expectation to match the proposed new compiler output, would fail with the current compiler).

The Gordian knot is cut in the bowels of cargotest's very notion of comparison (of JSON objects) itself, by means of introducing a magic string literal `"{...}"`, which can server as a wildcard for any JSON sub-object.

And so it will be for the children, and the children's children, and unto the 1.17.0 and 1.18.0 releases, that Cargo's build test expectations will faithfully expect the exact JSON output by Cargo itself, but the string literal `"{...}"` shall be a token upon the JSON output by rustc, and when I see `"{...}"`, I will pass over you, and the failure shall not be upon you.

And this day shall be unto you for a memorial.

supersedes #3513

r? @alexcrichton
@bors
Copy link
Collaborator

bors commented Feb 3, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 550bd43 to master...

@bors bors merged commit 88f6a30 into rust-lang:master Feb 3, 2017
@ehuss ehuss added this to the 1.17.0 milestone Feb 6, 2022
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.

None yet

5 participants