Restore exposing machine file parsing#10763
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom May 23, 2024
Merged
Conversation
This was accidentally removed in e989c83. I restored it and also did a few other cleanups: - Make a static method for namespacing purposes - Put the test files in the data dir with the other test data - Avoid mutating globals in the machine config tests This will be used by Hydra.
be52d62 to
f2bcebc
Compare
Ericson2314
added a commit
to NixOS/hydra
that referenced
this pull request
May 23, 2024
haenoe
reviewed
May 23, 2024
| @@ -170,7 +170,7 @@ static Machine parseBuilderLine(const std::string & line) | |||
|
|
|||
| return { | |||
| tokens[0], | |||
Contributor
There was a problem hiding this comment.
Maybe this is a bit specific to me but I had some problems at the start where it took some time to realize which fields mean what, especially because token, tokenizeString etc. seem very abstract at first.
It may be helpful to include that in a comment, so you don't have to jump back and forth between Machine and this method.
Member
Author
There was a problem hiding this comment.
That makes sense. I do wish we could use .field = ... notation for this. (I guess we can soon with a newer C++.) I can add some comments for now. I will do that in a follow-up PR.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
This was accidentally removed in e989c83. I restored it and also did a few other cleanups:
Make a static method for namespacing purposes
Put the test files in the data dir with the other test data
Avoid mutating globals in the machine config tests
Context
This will be used by Hydra.
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.