Skip to content

Comments

Restore exposing machine file parsing#10763

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:expose-parsing-machines
May 23, 2024
Merged

Restore exposing machine file parsing#10763
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:expose-parsing-machines

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.
@Ericson2314 Ericson2314 force-pushed the expose-parsing-machines branch from be52d62 to f2bcebc Compare May 23, 2024 04:03
Ericson2314 added a commit to NixOS/hydra that referenced this pull request May 23, 2024
@@ -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
@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