-
-
Notifications
You must be signed in to change notification settings - Fork 294
[WIP] Allow selecting fsproj files into workspace #1955
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
base: main
Are you sure you want to change the base?
Conversation
|
@baronfel @TheAngryByrd This is still WIP but I wanted to check if this was a feature that would be accepted. The defaults would have to be rethough a bit since Ionide always loads the available sln file instead of prompting the user. I was also thinking about adding a new command for selecting multiple fsprojs, and then an configuration option that allows the user to set their default fsprojs. |
|
There's a lot of overlap here between an already-existing |
|
I thought about going the slnf route but the downside of that is that you also need to maintain an actual solution file which contains all the projects. The main motivator for me is to make it as frictionless as possible to open a repo and loading only the projects that you need for the work you are about to be doing. How I envisioned it is that a developer would do the following:
This workflow is really nice because you can configure your workspace without having to mess with any files at. |
|
There is also one other way to make the dev experience even easier and that would be:
This would be my ideal workflow but I think it's also quite a bit more complex to implement and that's why I went the route that is in the PR. If you think that lazy loading the projects like this would be possible then I think I'll have a go at it if you could point me in the right direction. |
|
I looked a bit into the lazy loading of projects and it seems like the main blocker for doing it is that we can't tell what fsproj an .fs file belongs to without calling |
|
No, there's no good way. In addition, our current mechanism is incomplete because the file could belong to multiple projects. |
|
In case you haven't seen it, slngen is some prior art in this space. |
WHAT
🤖 Generated by Copilot at be8ee10
This pull request adds support for single F# project files (
.fsproj) as a possible workspace configuration. It updates various modules and types to handle this scenario in the workspace peek feature, the build task generation, and the solution explorer panel. It also adds support for directories as results of the workspace peek feature.🤖 Generated by Copilot at be8ee10
🛠️🌲📁
WHY
When working in a monorepo with multiple independent projects it is not feasible to load all the projects in the repository. This change allows the user to select the projects that they are working on and only load them.
HOW
🤖 Generated by Copilot at be8ee10
WorkspacePeekFoundtype to include aFsprojcase for project files (link)mapFoundandparsefunctions inLanguageService.fsto handle theFsprojcase and return an array ofWorkspacePeekFoundvalues (link, link)getProjectsFromWorkspacePeekandisLoadingWorkspaceCompletefunctions inProject.fsto handle theFsprojcase and return a list or an array of project file paths (link, link)ConfiguredWorkspacetype to include aFsprojcase for project files (link)privatefunction inProject.fsto convert a string value into aConfiguredWorkspacevalue if it ends with ".fsproj" (link)privatefunction inProject.fsto check the validity of aConfiguredWorkspacevalue if it is aFsprojcase (link)privatefunction inProject.fsto return the path of aConfiguredWorkspacevalue if it is aFsprojcase (link)setFromPeekfunction inProject.fsto convert aWorkspacePeekFoundvalue into aConfiguredWorkspacevalue if it is aFsprojcase (link)equalPeekfunction inProject.fsto compare aConfiguredWorkspacevalue and aWorkspacePeekFoundvalue if they are bothFsprojcases (link)textfunction inProject.fsto create a quick pick item for the workspace selection panel if the workspace peek contains aFsprojcase (link)privatefunction inProject.fsto return the priority of aWorkspacePeekFoundvalue for the workspace selection panel if it is aFsprojcase (link)buildTaskListForSolutionfunction inMSBuild.fsto handle theFsprojcase and return an empty sequence of tasks (link)privatefunction inSolutionExplorer.fsto handle theFsprojcase and create a tree node for the project file (link)WorkspacePeekFoundvalues to use thepickFSACWorkspacefunction instead of preferring the solution file (link)privatefunction inProject.fsto set the context and the status bar for the current workspace depending on the type of theConfiguredWorkspacevalue (link)ProjectinProject.fs(link)