-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
lib/tests/triples.nix: add test suite and fix our parser so it passes #235230
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced May 31, 2023
This was referenced Jun 15, 2023
ghost
changed the title
lib/tests/systems.nix: add tests to verify agreement with gnu-config
lib/tests/triples.nix: add gnu-config conformance test suite
Jun 19, 2023
ghost
marked this pull request as ready for review
June 19, 2023 07:18
ghost
requested review from
alyssais,
Ericson2314,
matthewbauer,
edolstra and
infinisil
as code owners
June 19, 2023 07:18
ofborg
bot
added
8.has: clean-up
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild
10.rebuild-linux: 1-10
labels
Jun 19, 2023
ghost
mentioned this pull request
Jun 20, 2023
ghost
requested a review
from sternenseemann
June 20, 2023 23:59
ghost
commented
Jun 21, 2023
ofborg
bot
added
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild
and removed
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild
10.rebuild-darwin-stdenv
This PR causes stdenv to rebuild
labels
Jun 21, 2023
gnu-config doesn't include this.
This commit fixes the logic for handling missing/unknown vendor fields in triples, and extends it to handle mmix and microblaze CPU-types.
This commit adds lib/tests/triples.nix, which exhaustively tests that our platform triple parse-then-unparse round-trip agrees with gnu-config for all inputs that it accepts (it may -- and does -- reject triples which `gnu-config` accepts).
With this commit, we now parse or reject the following identically to gnu-config: - aarch64-solo5-none (accept) - aarch64-solo5-none-elf (reject) Closes #165836.
This commit adds support for triples with a missing kernel, rather than kernel="none". It also adds a parser case for triples which have a vendor and abi, but no kernel. This allows to parse "*-unknown-elf" triples. Closes #230160.
…g now understands it) gnu-config commit 6c78704d542cebfb56d17474fe9f8395e9defb94 added upstream support for ghc's javascript triple, so we can remove the exception now.
This reverts commit 20a384ee5c642021786bb5981bb613d95273bb6e.
…m x86_64-apple-darwin-
ghost
marked this pull request as ready for review
December 1, 2023 21:43
ofborg
bot
added
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild
and removed
10.rebuild-darwin: 1-10
labels
Dec 2, 2023
ghost
closed this
Jan 23, 2024
ghost
deleted the
pr/lib/systems/parser-tests
branch
January 23, 2024 06:48
Hey! Sorry to see this closed, was looking forward to seeing this in action =/ Can I inquire as to what's the plan going forward on this? Is this abandoned/halted for some (afaict) unspecified reason? |
This is related to #50105 (comment) and I suppose someone will have to pick the work to get it to finish line themselves. |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: lib
The Nixpkgs function library
6.topic: rust
8.has: clean-up
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild
10.rebuild-linux: 1-10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As promised; sorry it took so long. Probably best reviewed one commit at a time.
Closes #165836
Closes #230160
Description of changes
This PR adds
lib/tests/triples.nix
, which exhaustively tests that our platform triple parse-then-unparse roundtrip agrees withgnu-config
for all inputs that it accepts (it may -- and does -- reject triples whichgnu-config
accepts).This PR also includes the commits needed in order to get the test suite to pass.
There are only two major exceptions in nixpkgs to agreement with
gnu-config
-- these are triples which we accept butgnu-config
rejects:vc4-elf
(forvc4-{gcc,binutils}
, reverse engineered fork for broadcom's gpu)fixed upstream 6c78704d542cebfb56d17474fe9f8395e9defb94javascript-unknown-ghcjs
(forghc
)There is one minor exception: we canonicalize
""-linux
tounknown-linux
rather thanpc-linux
asgnu-config
does in some cases.Things done
CC: @sternenseemann @alyssais @Ericson2314