Open klezm opened 1 year ago
Hi 👋
Thanks for opening the issue.
Using the deprecated properties settings and extensions will overwrite/reset all other user settings
@klezm When you say user-settings, are these the one which gets added by the Features?
If that's the case, then I think it seems like a change in behavior is a result of https://containers.dev/implementors/spec/#merge-logic ; where the devcontainers/cli
merges the customization property from devcontainer.json
and devcontainer-feature.json
. The merge logic might not be added to the deprecated extensions
& settings
property.
If you are looking to turn off all the customizations
property, you could use the experimental --skip-persisting-customizations-from-features
flag for the devcontainer build
command. It omits all the Feature specified customizations
ie. if your devcontainer.json
referred to a set of Features, then their corresponding customizations (which includes extensions) will not be applied to your dev container.
We also have a similar issue open for opting out of extensions, see https://github.com/devcontainers/features/issues/386
The issue is independent from the features. My guess is that setting extensions
but not customizations
→ vscode
→ extensions
will leave the latter to be []
therefore omitting locally installed vscode extensions. But If you set customizations
→ vscode
→ extensions
to e.g. ["ms-python.python"]
the merge logic of vscode will add that extensions to the locally installed ones.
Problem
Using the deprecated properties
settings
andextensions
will overwrite/reset all other user settings and not install any other extensions than defined in the propertyextensions
. Using the properties inside thecustomizations
property will only change the defined settings and install the defined extensions additionally to the user extensions.Deprecated properties (legacy mode):
Current usage of these properties:
The
customizations
property was discussed in #1.Proposal
It should be possible to reset any user settings/extensions in
customizations
→vscode
→settings
/extensions
. Maybe add a propertyreset
: