Skip to content

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
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ShreyasJejurkar
Copy link

@ShreyasJejurkar ShreyasJejurkar commented Nov 1, 2021

  • Build the entire repository successfully.
  • Run and validate projects

Running bash sl.sh setup in terminal successfully built the entire repository.

WIP

@ashmind
Copy link
Owner

ashmind commented Nov 2, 2021

Thanks for raising this! I'll take a look now.

@@ -4,6 +4,11 @@ $ErrorActionPreference = 'Stop'
$webappServerUrl = 'http://localhost:44100'

Write-Host "Opening new window for initial wait" -ForegroundColor White
Start-Process powershell -ArgumentList "-File `"$PSScriptRoot/run/wait.ps1`""

if ($IsWindows) {
Copy link
Owner

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]).

Copy link
Author

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 executable pwsh. If we make pwsh here, then we need to make it mandatory for contributors install PowerShell-Core, which I don't think is needed, as things can work with legacy PowerShell as well on windows.

FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we do have a node version requirement (for WebApp).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why NODE_VERSION="none" here, need to check. But we do have NPM installed in codespaces. Check screenshot.

image

RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"

echo "Done!"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, can this script be a submodule or otherwise downloaded dynamically?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be there in the repository for codespaces. It's added by codespaces itself, so not sure!

@ShreyasJejurkar
Copy link
Author

ShreyasJejurkar commented Nov 3, 2021

One question I got one error for one the project can't remember the name actually, that the projects require .NET SDK 3.1 but found installed .NET SDK 5.0.100 (as this is what global.json says).

Do we need both SDK to be installed as part of building SharpLab!? (right now we are installing both 3.1 and 5 SDK in the codespaces machine).

See this one.
image

1. Added extensions for C# and Vue development.
2. Added some most used omnisharp settings for better experiance!
3. Changed dockerfile to 5.0.
@ShreyasJejurkar
Copy link
Author

I ran bash sl.sh run to run the projects.
Tye ran successfully. But on console, I got the following error for azurite.

image

Tye dashboard.
image

It seems like azurite and webapp-assets are failing because those are restarted several times!

@ShreyasJejurkar
Copy link
Author

I checked the log for web assets, seems like mirrrorsharp error.

 [LessError: '../../node_modules/mirrorsharp/mirrorsharp.less' wasn't found. Tried - /workspaces/SharpLab/source/WebApp/node_modules/mirrorsharp/mirrorsharp.less,../../node_modules/mirrorsharp/mirrorsharp.less] {

@ashmind
Copy link
Owner

ashmind commented Nov 5, 2021

Thanks for raising those.
Just to note, it might take me a bit of time to get back to this one, as I am trying to resolve few other issues, and for OSS the timelines depend on my other priorities as well.

Azurite should be installed by the latest sl setup, not sure about the missing mirrorsharp error though.

@ShreyasJejurkar
Copy link
Author

Thanks for raising those. Just to note, it might take me a bit of time to get back to this one, as I am trying to resolve few other issues, and for OSS the timelines depend on my other priorities as well.

Azurite should be installed by the latest sl setup, not sure about the missing mirrorsharp error though.

ahh, no worries. We can go slow based on priority. No problem at all!

I will check azurite, and let you know about it!

@ShreyasJejurkar
Copy link
Author

took latest from main.
But getting the following error for azurite!

image

image

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