Repository navigation
The dev container's Python tools in their own environment - #101
Merged
Merged
Conversation
The workspace is the host's folder, and a .venv that uv made on the host names the host's paths in its scripts. uv takes it as current, and in the container the tools failed to start: "Failed to spawn: clang-tidy", as in AtmegaTimer, whose .venv came from the host. UV_PROJECT_ENVIRONMENT gives the container an environment of its own, relative, so that each worktree keeps its own too.
Merged
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.
In the dev container, the Python tools (clang-format, clang-tidy, cpplint, copier and the others) could fail to start with
Failed to spawn: clang-tidy. The workspace is the host's folder, and a.venvthat uv made on the host names the host's paths in its scripts; uv takes such an environment as current and does not repair it. AtmegaTimer ran into this: its.venvcame from the host, andmake checkstopped atmake tidy.The dev container now keeps its own environment,
.venv-devcontainer, next to the host's.venv, which it leaves alone. It is relative to the project, so each worktree still has its own. Git ignores it. CI and the host are unchanged.For a project: after
copier update, rebuild the dev container. A.venvthe container made before can be deleted.How it was checked: a project generated from this branch, with a
.venvwhose scripts point at a host path beside it. Without the new setting,uv run clang-tidyfails as in AtmegaTimer; with it, uv makes.venv-devcontainer, andmake lintandmake tidypass. The feature's JSON parses, andgit statusshows both environments as ignored.