-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev container feature ordering, multiple features in same repository #26
Comments
For future reference: I think this was partly broken out from #8, correct?
By this, do you mean that you do not need to implement
By this do you mean, the current object-based syntax (non-array) in devcontainer.json? If so, I think the question is whether we just convert to an array behind the scenes and keep it with an assumed alphabetical order, or have tools / services that support the old format do a "squiggle" to indicate its deprecated and will be removed somewhere along the way. |
@Chuxel Yeah I just felt that some are not as explicit and I thought a discussion on the specific points.
For this I was thinking something closer to how Actions work. Meaning that we can have a For the file structure I was thinking something like:
Like proposed in https://github.com/microsoft/dev-container-spec //issues/7 the idea would be that we can still distribute groups of features as a single collection, on 1 tar file. This way library scripts or data common to a group of features would still be distributed with them. But from the point of the spec each feature would be parsed/executed separately, in its own layer and is considered independent. The 'features-collection.json' file is more of a UX help on what features exist at the moment of searching and where they are located. 'feature.json' would be the file that we would use to execute a particular feature referenced in 'devcontainer.json'
I like the second idea since it maintains things working as today and supports the array syntax moving forward. |
Got it - that makes sense and would be compatible with #21. Having one giant file right now does get cumbersome for editing. features.json then could be closer to devcontainer.json in its format without that getting out of hand. e.g. |
Using an array in the way described above makes sense, as it seems to make config feel more manageable. I'm trying to discern all of the features files that could exist in a project. I have the following understanding:
How do feature.json and features-collection.json tie in? Is features-collection.json an alternative option to or new name for devcontainer-features.json? Do you have an example of what a feature.json would look like compared to the other files here? |
The way I think about it is that we have files required to execute each feature and files for organization, UX and search of the available features. The special case is when we have libraries of scripts that are shared by different features. ConceptFeature
Structure+-- feature The filenames would be the default names if a feature.json is not present or does not contain that information. feature.json
Options
In this way feature.json becomes the complete information about the feature itself. Feature CollectionIn the case where the intent is to have a library of scripts common to a group of features or the intent is to distribute them as a single package then the structure can be one folder up and include a StructurecollectionFolder feature-collection.jsonThe structure of this file could be as proposed here #15 and in a way it can be generated automatically by appending each feature.json file for each feature. Strictly speaking its not required for execution, since the application, through the id can identify the particular feature its is looking for and execute it, but it can serve as the information included with a release so that applications can show this information to the users prior to downloading the package. devcontainer.jsonFor In the case of an array, then the structure would be:
ID can be any of the following:
If we agree I can update the proposal with this changes. |
The explanation above was super helpful, thanks so much for writing it up @edgonmsft.
Meaning we'd adopt the bullets under the |
Yeah I'm transforming it into more of a spec document and merging it with #15 to do 1 document |
Generally sounds like a good plan to me! I have a few smaller comments, which i'll leave for PR #15 when that is updated :) |
Added the proposal here: #27 |
Should we close this issue now that #27 is merged? |
Agreed this should be closed given that:
|
Exploring more widespread usage of features as they are implemented today a couple of interesting scenarios came up:
Proposal
Thinking of this situation the proposal is:
feature.json
, similar to how GitHub Actions work, where we could eventually support different ways features could be executed besides theinstall.sh
supported today.Questions
I think the biggest question is to define how we want to handle backwards compatibility with the way features are implemented and defined today.
The text was updated successfully, but these errors were encountered: