Skip to content

Parse output from older version of the devcontainer CLI by looking for a JSON object in plaintext#47403

Merged
KyleBarton merged 1 commit intomainfrom
fix_parsing_for_old_devcontainer_cli
Jan 22, 2026
Merged

Parse output from older version of the devcontainer CLI by looking for a JSON object in plaintext#47403
KyleBarton merged 1 commit intomainfrom
fix_parsing_for_old_devcontainer_cli

Conversation

@KyleBarton
Copy link
Collaborator

Closes #46852

The devcontainer CLI which ships with VS Code can be added to the user's PATH with the VS Code command Dev Containers: Install devcontainer CLI. This version of the CLI is older than what Zed was developed with, and as a result, it doesn't separate its json-formatted output and its plaintext metadata into distinct output streams. This broke parsing in the CLI adapter in Zed. This fix accounts for that, and if parsing fails, attempts to find a relevant JSON object in plaintext and tries to parse that.

Tested with VSCode's version of the devcontainer CLI (0.80.1) as well as the up-to-date version (0.81.1)

Release Notes:

  • Improved parsing of devcontainer CLI output when using earlier versions

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 22, 2026
@maxdeviant maxdeviant changed the title Parse output from older version of the devcontainer CLI by looking for a json object in plaintext Parse output from older version of the devcontainer CLI by looking for a JSON object in plaintext Jan 22, 2026
@KyleBarton KyleBarton merged commit c63a0bc into main Jan 22, 2026
30 checks passed
@KyleBarton KyleBarton deleted the fix_parsing_for_old_devcontainer_cli branch January 22, 2026 17:14
zcg pushed a commit to zcg/zedpro that referenced this pull request Jan 29, 2026
…r a JSON object in plaintext (zed-industries#47403)

Closes zed-industries#46852

The devcontainer CLI which ships with VS Code can be added to the user's
`PATH` with the VS Code command `Dev Containers: Install devcontainer
CLI`. This version of the CLI is older than what Zed was developed with,
and as a result, it doesn't separate its json-formatted output and its
plaintext metadata into distinct output streams. This broke parsing in
the CLI adapter in Zed. This fix accounts for that, and if parsing
fails, attempts to find a relevant JSON object in plaintext and tries to
parse that.

Tested with VSCode's version of the devcontainer CLI (`0.80.1`) as well
as the up-to-date version (`0.81.1`)

Release Notes:

- Improved parsing of devcontainer CLI output when using earlier
versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When VS Code’s devcontainer CLI is installed, Zed can’t start a devcontainer

1 participant