-
Notifications
You must be signed in to change notification settings - Fork 464
Add dev container #6962
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
Add dev container #6962
Conversation
See https://github.com/rescript-lang/rescript-compiler/blob/master/.vscode/extensions.json
Not sure what you mean exactly. The opam stuff goes into
I would say yes, it builds the OCaml compiler and all dependencies from source, this is a rather heavy operation.
I think it makes sense to do the opam init etc. in postCreate.sh and not in the Dockerfile (especially if this is run with a user other than root). |
Do I not need something like https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform to connect to the lps-server? Right now I don't get any highlighting for any
Yes, this is the case, I've learned how to deal with this. But moving all that to |
Ah, yes, you are right, |
Yep, that worked. Thanks, I think this is good to go. |
Just noticed that the extension Could you also add the missing extensions to https://github.com/rescript-lang/rescript-compiler/blob/master/.vscode/extensions.json, please? |
I tried to work with the dev container, but got the following error:
|
After a |
Could you also add a CHANGELOG entry? |
Ok so now my Devcontainer was created successfully. The opam stuff is not in the path there, I need to execute |
I have this in bash, please try |
I have the exact same issue in zsh (opam env not set, and after I set it |
Yes, postCreate.sh runs till the end, but it still doesn't work for me. |
Works for me after the setup process in a built-in zsh
|
Can you also adapt the installation section in CONTRIBUTING.md? In a way that makes it clear what parts of the manual setup are covered. |
Ok, then something is broken on my machine. Will give it another try later. |
Sure, do you mean adding a section on how the devcontainer works? Or updating some of the existing text? |
Maybe add a new section "Devcontainer Setup" below the existing "Setup" section? |
Hmmm, I think maybe something like InstallationA. Manual InstallationInstall OCaml compiler + dependenciesnpm installB. Installation via devcontainer |
Retried and it still didn't work for me. Something else: In the log output from the post create script, I found the following:
So it seems the shell setup can be performed automatically if |
but this file doesn't get sourced by |
Ok, never mind then. |
Co-authored-by: Christoph Knittel <[email protected]>
Co-authored-by: Christoph Knittel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks a lot!
Hell yeah! Thanks for this! |
Fixes #6851
@cristianoc what VS Code extensions do you use to develop in this codebase? These should be included in the devcontainer as well.
I noticed that running
opam init
in the Dockerfile does not initializeopam
in thepostCreate.sh
file. I'm not sure why this is. All theopam
commands are very heavy and make my pc go into overdrive, is this normal? I'm also not sure whether this lines should be in the Dockerfile or postCreate.sh.Are all these steps in the
postCreate.sh
necessary you think? If we could have a trimmed down version of this, that be great as well.