-
Notifications
You must be signed in to change notification settings - Fork 210
feat (codespaces) - Added initial support for codespaces. #865
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
Draft
ShreyasJejurkar
wants to merge
4
commits into
ashmind:main
Choose a base branch
from
ShreyasJejurkar:codespaces-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c3ec01d
feat (codespaces) - Added initial support for codespaces.
ShreyasJejurkar b71b737
Added linux variant of scripts for building with codespaces.
ShreyasJejurkar a32cca2
Merge branch 'main' of https://github.com/ShreyasJejurkar/SharpLab in…
ShreyasJejurkar e8045c8
Addressed PR feedback.
ShreyasJejurkar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/dotnet/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal | ||
ARG VARIANT="5.0" | ||
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} | ||
|
||
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 | ||
ARG NODE_VERSION="none" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, we do have a node version requirement (for WebApp). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
COPY --from=mcr.microsoft.com/vscode/devcontainers/dotnet:5.0 /usr/share/dotnet /usr/share/dotnet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/dotnet | ||
{ | ||
"name": "C# (.NET)", | ||
"runArgs": [ | ||
"--init" | ||
], | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 | ||
// Append -bullseye or -focal to pin to an OS version. | ||
"VARIANT": "3.1", | ||
// Options | ||
"NODE_VERSION": "lts/*" | ||
} | ||
}, | ||
"settings": { | ||
// Loading projects on demand is better for larger codebases | ||
"omnisharp.enableMsBuildLoadProjectsOnDemand": true, | ||
"omnisharp.enableEditorConfigSupport": true, | ||
"omnisharp.enableImportCompletion": true, | ||
"omnisharp.enableRoslynAnalyzers": true | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-dotnettools.csharp", | ||
"EditorConfig.EditorConfig", | ||
"editorconfig.editorconfig", | ||
"jcbuisson.vue", | ||
"dbaeumer.vscode-eslint" | ||
], | ||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
"features": { | ||
"powershell": "latest" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Probably don't have to check, we can just require it to be
pwsh
on Windows as well, or get whatever is the current shell (should be some built-in constant somewhere, or worst case command line[0]).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.
pwsh
is only applicable for PowerShell-Core. The PowerShell that bundles with Windows does not executablepwsh
. If we makepwsh
here, then we need to make it mandatory for contributors installPowerShell-Core
, which I don't think is needed, as things can work with legacy PowerShell as well on windows.