devcontainer: Support .devcontainer.json in project root#48814
devcontainer: Support .devcontainer.json in project root#48814KyleBarton merged 3 commits intozed-industries:mainfrom
.devcontainer.json in project root#48814Conversation
Per the devcontainer spec, `.devcontainer.json` in the project root is a valid config location. It is only used when no configurations are found inside `.devcontainer/`. Extract `find_configs_in_snapshot` for testability and add tests.
a317f2a to
065f363
Compare
.devcontainer.json in project root
|
@oliverbarnes thanks for this! Just to check - is this ready for review? I see you changed the title, but the PR is still in draft. |
@KyleBarton you're welcome! This is working and I've pushed it to signal it's in the works and almost ready, but I just wanted to give it another pass tomorrow with fresh eyes before opening for review. Will update first thing tomorrow (I'm in WET time) |
|
Awesome, take your time, just wanted to make sure you weren't waiting on us. Thanks again! |
|
Oh, ok :) Appreciated. I was worried you guys might also be working on it. Giving it a fresh pass now, and indeed the order of precedence between the root and subfolder configs was swapped. I'm fixing it and consolidating changes a bit |
Also, reuse `find_configs_in_snapshot` in the suggestion module
|
Ok, fixed the precedence and included the root config in the picker. Ready for review! |
KyleBarton
left a comment
There was a problem hiding this comment.
Looks great! Had a couple of nits on the comments, if you don't mind taking a quick look. Otherwise, thanks for a very clean and well-tested change!
This is an experiment showing what the docs-suggest workflow would have generated for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This is an experiment showing what the docs-suggest workflow would have generated for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This is an experiment showing what the docs-suggest workflow would have generated for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Example output showing what the docs-suggest automation would generate for the v0.224 preview release. PRs analyzed: - #48118: Forward ZED_ env vars to flatpak (no docs needed) - #48467: Move update button to title bar (docs needed) - #48553: Tool permissions refactor (docs exist, wrong format) - #48592: vim :bdelete command (docs needed) - #48814: Devcontainer root support (docs needed) - #48912: Split diff default (docs needed) 5 of 6 PRs generated actionable suggestions. Files: - docs/.suggestions/v0.224-suggestions.md: Raw suggestion output - docs/src/update.md: Update notification UI documentation - docs/src/vim.md: Added :bdelete command - docs/src/dev-containers.md: Root config file location support Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Closes #48683
Per the devcontainer spec,
.devcontainer.jsonin the project root isa valid config location. It is only used when no configurations are
found inside
.devcontainer/.Extract
find_configs_in_snapshotfor testability and add tests.Release Notes:
.devcontainer.jsonin project root