Skip to content

refactor(pixi-build-cmake): name the build directory once - #6937

Open
hunger wants to merge 1 commit into
prefix-dev:mainfrom
hunger:push-uwzzswnonkpr
Open

refactor(pixi-build-cmake): name the build directory once#6937
hunger wants to merge 1 commit into
prefix-dev:mainfrom
hunger:push-uwzzswnonkpr

Conversation

@hunger

@hunger hunger commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The build script created and entered build by writing the name out, next to a template variable holding the same name and the NINJA_BUILD_DIR constant that the input tracking uses to find the tree again afterwards. Three spellings of one name, and the two in the template were already out of step: the Windows branch used the variable, while the Unix branch and the shared pushd did not.

Nothing misbehaves today, as all three say build. Changing one of them is what breaks: the input tracking would go looking for a tree the script no longer creates, and no test would notice.

The constant is now the single definition and reaches the template through the context, the way the source directory already does. The rendered scripts are unchanged.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude, Codex

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

The build script created and entered `build` by writing the name out, next
to a template variable holding the same name and the NINJA_BUILD_DIR
constant that the input tracking uses to find the tree again afterwards.
Three spellings of one name, and the two in the template were already out of
step: the Windows branch used the variable, while the Unix branch and the
shared `pushd` did not.

Nothing misbehaves today, as all three say `build`. Changing one of them is
what breaks: the input tracking would go looking for a tree the script no
longer creates, and no test would notice.

The constant is now the single definition and reaches the template through
the context, the way the source directory already does. The rendered scripts
are unchanged.
@hunger
hunger requested a review from Hofer-Julian September 1, 2026 13:51
@hunger

hunger commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@Hofer-Julian This one is small and should be uncontroversial.

The next one adds a parser for cmake, that is going to be bigger (and more error prone).

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.

1 participant