Open behrica opened 3 months ago
This is super interesting.. I just work with everything installed locally but I can totally understand how some people might prefer to have a "sandbox" to try things out in before they invest too much. It would be nice to have an accessible starting point for new users. My only concern would be teaching people to start using a set up that they can't use for the long term (in the past I've been burned a lot by docker, nix, and other tools that claim to offer an "all batteries included" solution to dev environments so I'm skeptical 😅). In your experience with devcontainers do the actually work for "real world" projects, and with heavy use?
I think we need to distinguish between 2 things:
1) Adding a devcontainer.json
file to a code base
2) wondering about which tool
a user can / should / will use to make use of the devcontainer.json
file
("using of no tool" is helpful already, as the devcontainer.json
is human readable)
In a "pure Clojure project" this gives very little added value, as "setup Clojure" is absolutely straightforward on any OS.
(Even-though giving a devcontainer.json
would freeze and document the working/tested "java + Clojure" version)
Doing 1) is very easy for "us / you".
Suggesting a concrete tool for 2) is less easy, as any "devcontainer supporting tool" works under certain assumptions, uses case:
A list is of "supporting tools" is maintained here: https://containers.dev/supporting
So I would not go into 2).
I would just say,
We provide a devcontainer spec, please feel free to use any tool from xxxx to make use of it to setup your environment or read
libpython-clj
docu.
Of course, when you provide such devcontainer spec, you need to try it. For this you can "pick" any of the tools. If it works for "one tool", you can suppose it works for all others.
(The "tool list" above tries to document the "slight" deviations between the tool regarding the support of the standard. There are as well "GitHub" actions which can build continuously a container from a devcontainer spec,for testing it.
We started as well to create 2 "Clojure devcontainer templates"
See here https://github.com/scicloj/devcontainer-templates/tree/main/src/scicloj
and https://github.com/scicloj/devcontainer-templates/pull/19
A "devcontainer template" can be used to "setup" a devcontainer.json in a new folder. This is supported by "some" of the tools above. (VSCode, GitHub/Codespaces, devcontainer CLI)
Are you aware of "devpod" ?
It its a cli tools which setup
devcontainers
. it seems to be supported on Mac as well: https://devpod.sh/In this case, you could have
devcontainer.json
file in your repo, which setups Clojure and Python . So basically the "manual steps" of your readme to setup python, python packages and python.edn would be full automatic and specified in the devcontainer.jsonDevcontainer is "fully integrated" in VsCode, so for VSCode users it is enough to "open" the folder, and the rest happens full automatic. Emacs users would need to use devpod cli manually and follow "instructions" how to jack in.
If you are interested, I can make a PR here, adding the needed files and you could try it with both, VSCode and Emacs.