Skip to content

[Bug]: New env bootstrap parameter breaks XPC API compatibility. #1433

Description

@jglogan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

I tried running a plugin that used an older version of the client against the main branch, and saw this error:

Error: failed to bootstrap container (cause: "invalidArgument: "env cannot be empty"")

Problem description

Older clients that don't send env with bootstrap should use a default of [:].

There are a couple of other nits:

  • env as a func parameter and XPC dictionary key is ambiguous when we hav --env for container create/run and ENV in Dockerfiles, both for the immutable container environment. Since these are special-case variables dynamically computed at start, it makes sense to use dynamicEnv.
  • [String:String]? is overcomplicated, in almost all cases we should be using Type? for 0..1 cardinality and [Type] for 0..* cardinality.

Environment

- OS: 26
- Xcode: 26
- Container: main

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions