Skip to content

IDE: issues with auto-configuration #5324

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

Closed
smarter opened this issue Oct 24, 2018 · 2 comments
Closed

IDE: issues with auto-configuration #5324

smarter opened this issue Oct 24, 2018 · 2 comments
Assignees
Labels

Comments

@smarter
Copy link
Member

smarter commented Oct 24, 2018

Two issues that I've observed:

  • When I open Code, close all workspaces, create a new file, then save it as "foo.sc", vscode-dotty kicks in and tries to find a suitable workspace path, but it seems that the uri it gets for vscode.window.activeTextEditor.document is "untitled:/Untitled-1", so .fsPath is empty and we try to set the root of the filesystem as the workspace directory. We should at least check if (documentPath) in setWorkspaceAndReload to avoid this, but we should also see if we can get the real url somehow (or maybe this is a VSCode bug we should report ?)
  • When a file ending in .sc is opened outside a folder, vscode-dotty immediately calls setWorkspaceAndReload, then ask the user if the Dotty IDE should be started. But setting the workspace can be problematic: in a big directory you're likely to get warnings from vscode about maximum number of file watches reached, etc. It would be better to ask the user before changing the workspace.
@Duhemm
Copy link
Contributor

Duhemm commented Oct 31, 2018

When a file ending in .sc is opened outside a folder, vscode-dotty immediately calls setWorkspaceAndReload, then ask the user if the Dotty IDE should be started. But setting the workspace can be problematic: in a big directory you're likely to get warnings from vscode about maximum number of file watches reached, etc. It would be better to ask the user before changing the workspace.

Is that specific to .sc files? Doesn't the same happen with .scala files?

Duhemm added a commit to dotty-staging/dotty that referenced this issue Oct 31, 2018
Also, verify that we are able to find a workspace root at all.

Fixes scala#5324
@smarter
Copy link
Member Author

smarter commented Oct 31, 2018

I haven't checked but I assume it happens with .scala files too.

Duhemm added a commit that referenced this issue Oct 31, 2018
Fix #5324: Ask before switching workspaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants