Skip to content
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

Introducing a minimal devcontainer (for codespaces) #2998

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

mtzguido
Copy link
Member

This PR adds the .devcontainer directory with a specification for how to create an F* devcontainer. This devcontainer is what's used to generate a 'codespace', which is just a devcontainer running on Github's servers.

The container is based on a Dockerfile that installs our usual dependencies, and will also run make as part of the creation process. Also, it automatically installs the F* vscode extension, so starting a codespace will give a usable F* out of the box.

The container can also be run locally within vscode by just using the "Reopen in container" command. VS Code will in fact automatically suggest that when opening the workspace.

I tried to base this container on top of Github's codespace image (instead of a plain Ubuntu image), but I got different behaviors when running locally and on codespaces.. so I dropped that idea for now.

Note: when someone creates a codespace from the F* repo, the resource consumption (/ billing) runs on their tab. Having this file here should not use any resources from the FStarLang org.

@mtzguido
Copy link
Member Author

BTW you can try this PR out by hitting the '<>Code' button above.
2023-07-31 01:02:12_2
It will take a while to build but you should just see a VS code UI when it is done.

@nikswamy
Copy link
Collaborator

Wow, this is really nice. I was able to get a working environment with VS Code just clicking on the code button.

One nit: once the editor launched, I had to reload the window to get syntax highlighting and gutter icons. Not sure why. We might record that in a README somewhere as FAQ/workaround.

image

For now, only a 'minimal' devcontainer suitable for low-overhead local
hacking and also running on codespaces.
@mtzguido mtzguido merged commit 8f812f3 into FStarLang:master Jul 31, 2023
1 check passed
@mtzguido mtzguido deleted the cs branch July 31, 2023 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants