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

Restore exposing machine file parsing #10763

Merged
merged 1 commit into from
May 23, 2024

Conversation

Ericson2314
Copy link
Member

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.

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.
@@ -170,7 +170,7 @@ static Machine parseBuilderLine(const std::string & line)

return {
tokens[0],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Ericson2314 Ericson2314 merged commit 2c42e7b into NixOS:master May 23, 2024
9 checks passed
@Ericson2314 Ericson2314 deleted the expose-parsing-machines branch May 23, 2024 13:58
Ericson2314 added a commit to NixOS/hydra that referenced this pull request May 23, 2024
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.

2 participants