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

IDE: Find and add workspace root if there are none #5285

Merged
merged 3 commits into from Oct 18, 2018

Conversation

Projects
None yet
2 participants
@Duhemm
Copy link
Contributor

Duhemm commented Oct 18, 2018

When the IDE is opened without a workspace (no folder is open), and then
a Scala source is opened, we will now search for the closest possible
workspace root (the closest parent directory that contains a
build.sbt). If no such directory can be found, the parent directory of
the file that has been opened is chosen. This folder is then added as a
workspace folder.

Adding a new workspace folder triggers a reloading of the extension. The
code of the extension will be executed in an environment where a
workspace root is set, and Dotty IDE will be able to start correctly.

Fixes #5281

Duhemm added some commits Oct 18, 2018

IDE: Find and add workspace root if there are none
When the IDE is opened without a workspace (no folder is open), and then
a Scala source is opened, we will now search for the closest possible
workspace root (the closest parent directory that contains a
`build.sbt`). If no such directory can be found, the parent directory of
the file that has been opened is chosen. This folder is then added as a
workspace folder.

Adding a new workspace folder triggers a reloading of the extension. The
code of the extension will be executed in an environment  where a
workspace root is set, and Dotty IDE will be able to start correctly.

Fixes #5281
@smarter
Copy link
Member

smarter left a comment

LGTM, but we should check this works on Windows

@Duhemm

This comment has been minimized.

Copy link
Contributor

Duhemm commented Oct 18, 2018

Good point, I verified and it works with the last commit 👍

@Duhemm Duhemm merged commit 294537f into lampepfl:master Oct 18, 2018

2 checks passed

CLA User signed CLA
Details
continuous-integration/drone/pr the build was successful
Details

@Duhemm Duhemm deleted the dotty-staging:fix/5281-add-workspace branch Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment