Replies: 2 comments
-
After combing through some more issues, it appears that there is some discussion in devcontainers/spec#129. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for opening up this discussion, and I appreciate the idea you and others have been putting forward! This is something the team and I are currently investigating. I hope to share more details via a formal spec proposal soon (likely after the holidays, though). We're currently looking at this alongside devcontainers/spec#109, as there is likely some overlap here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is an extension of https://github.com/devcontainers-contrib/features/discussions/83 that I thought I would pose to you, the official @devcontainers org, to see how you have thought of doing it.
You have the same problem as us over in @devcontainers-contrib, though on a smaller scale (you have 28 packages, we have 73). Too many install scripts declare a
check_packages
function. If/when that function needs to be changed, it's hard to do it to every single feature. They're all in different spots, some have indentation different, etc.Have you thought about centralizing that logic into a single
check_packages.lib.sh
or similar? I notice that you have 26x hits when searching for "check_packages" on GitHub 😆, so you obviously have a similar problem as us.Right now my (@jcbhmr's) idea is to use
source ./vendor/*.sh
and copy a single commonvendor/
folder into eachsrc/*/
folder to makesrc/*/vendor/*.sh
files exist in each and every single feature image just prior to building/publishing. https://github.com/devcontainers-contrib/features/discussions/83#discussioncomment-4279546 https://github.com/jcbhmr/devcontainers-contrib-features-83-demo@DaneWeber pointed out that this is stepping dangerously close to dependency management territory 😬.
@danielbraun89 was previously (and still is) using Cookiecutter templates to generate each feature from a template
install.sh
file that includes a single def ofcheck_packages
. This is another possibility. https://github.com/devcontainers-contrib/features/tree/main/feature_specs https://github.com/devcontainers-contrib/features/tree/main/pkgs/feature-templateTL;DR: I want to involve some actual cool guys from the official @devcontainers org in our discussion. We are looking for other suggestions. I am NOT proposing that you, the @devcontainers/features repo, adopt this! I'm just asking for an outside professional perspective.
The goal is to avoid repetition of
check_packages
definitions in source code.Beta Was this translation helpful? Give feedback.
All reactions