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

Hard to launch a workbench without a workspace #176763

Closed
yiliang114 opened this issue Mar 10, 2023 · 13 comments · Fixed by #176771
Closed

Hard to launch a workbench without a workspace #176763

yiliang114 opened this issue Mar 10, 2023 · 13 comments · Fixed by #176771
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders
Milestone

Comments

@yiliang114
Copy link
Contributor

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.77.0 1b6f8eb
  • OS Version: Mac os intel

Steps to Reproduce:

  1. git clone the vscode latest source code.
  2. Use cmd + shift + b keybinding to start the development process. (Core - Build and Ext - Build).

My purpose is to start a blank workspace, similar to screenshot. But the current startup method, I can't achieve this effect.
image

If I execute ./scripts/code-web.sh directly, the vscode-web-playground extension will be automatically downloaded and loaded. The presence of a memory fileSystem is not what I expected.

image

if (args['playground'] === true || (args['_'].length === 0 && !args['folder-uri'])) {

If I execute ./scripts/code-web.sh --folder-uri=memfs:/test which folder-uri is random, Explorer will display the failed path, which is not the effect I want.

image

If I execute ./scripts/code-web.sh . , Explorer will display files from local

image

image

My advice is only use ./scripts/code-web.sh --playground to load vscode-web-playground extension, and if use./scripts/code-web.sh without any arguments, no fileSystemProvider extension by default

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.76.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@yiliang114
Copy link
Contributor Author

yiliang114 commented Mar 10, 2023

Hi @aeschli I did not find the use of --no-playground. What is the reason for adding this filter condition? It seems a little redundant

serverArgs.push(...process.argv.slice(2).filter(v => !v.startsWith('--playground') && v !== '--no-playground'));

If it is no longer useful, I can remove it.

@aeschli
Copy link
Contributor

aeschli commented Mar 10, 2023

We use the minimist library for argument parsing. For boolean arguments it allows to write --playground to enable and --no-playground to disable.

@yiliang114
Copy link
Contributor Author

We use the minimist library for argument parsing. For boolean arguments it allows to write --playground to enable and --no-playground to disable.

Thanks a lot, i got it. So the --playground parameters still need to be filtered out, I have resubmitted the code.

@aeschli
Copy link
Contributor

aeschli commented Mar 13, 2023

You can turn get an empty workspace by running ./scripts/code-web.sh -- --playground=false

Isn't that good enough?

@yiliang114
Copy link
Contributor Author

You can turn get an empty workspace by running ./scripts/code-web.sh -- --playground=false

Isn't that good enough?

@aeschli Thank you for your time. Please allow me to hold on a little longer.

My original intention was use./scripts/code-web.sh --playground to add vscode-web-playground extension defaultly and use ./scripts/code-web.sh would get an empty workspace.

The difference with the current logic is that now use ./scripts/code-web.sh to add vscode-web-playground extension defaultly and use ./scripts/code-web.sh -- --playground=false would get an empty workspace.

Maybe ./scripts/code-web.sh --playground is more like letting developers know they're going to load vscode-web-playground extension. But this is only my superficial understanding, if you think it is inappropriate or unnecessary, I will close the issue and PR

@aeschli
Copy link
Contributor

aeschli commented Mar 13, 2023

I guess both setups are useful.

  • The playground with its memory file system is there to have some resources available right away to allow the developer to test some features code-serverless
  • The empty workspace would be more consistent with other start scripts that do not add anything on top of starting code. Also it allows to open local folders

I'm fine changing the default. I don't think any of our tests depend on it.

@bpasero What do you think?

To teach devs about the playground/empty workspace, we could just print some more help text when code-web is started.

@bpasero
Copy link
Member

bpasero commented Mar 15, 2023

To clarify, what is the suggestion? To not show the in-memory sample thingy for scripts/code-web.sh:

image

?

@yiliang114
Copy link
Contributor Author

To clarify, what is the suggestion? To not show the in-memory sample thingy for scripts/code-web.sh:

image

?

yes

@bpasero
Copy link
Member

bpasero commented Mar 15, 2023

Not sure, scripts/code-web.sh is mainly meant for development. And you cannot really open a folder in that experience, so opening an empty instance makes it harder for someone to open files?

@aeschli
Copy link
Contributor

aeschli commented Mar 15, 2023

@bpasero You can, there's the Open Folder button that will open a local folder dialog like in vscode.dev.
Also you can start scripts/code-web.sh with a path to a local folder, to open a virtual filesystem serving the contents found on disk (see https://github.com/microsoft/vscode-test-web)

@bpasero
Copy link
Member

bpasero commented Mar 15, 2023

Then, go for it 👍

@yiliang114
Copy link
Contributor Author

Hey, @aeschli Is there anything else to confirm?

What else do I need to change? Or Keep the current design?

yiliang114 added a commit to yiliang114/vscode that referenced this issue Mar 23, 2023
yiliang114 added a commit to yiliang114/vscode that referenced this issue Mar 23, 2023
yiliang114 added a commit to yiliang114/vscode that referenced this issue Apr 4, 2023
aeschli pushed a commit that referenced this issue Apr 4, 2023
…nd (#176771)

* fix: close #176763, modify the conditions to load vscode-web-playground

* chore: use of recovery --no-playground parameters

* chore(script): update the argument description

* chore(script): update the argument description

* chore(script): update the argument description
@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Apr 4, 2023
@vscodenpa vscodenpa added this to the April 2023 milestone Apr 4, 2023
@vscodenpa vscodenpa added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Apr 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants