Skip to content

Allow LanguageServerProjectSystems to load into more than one workspace #78975

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

Conversation

jasonmalinowski
Copy link
Member

@jasonmalinowski jasonmalinowski commented Jun 14, 2025

Closes #78945

This allows us to place file-based programs in the host workspace so project-to-project references work; truly "miscellaneous files" projects will still stay in the MiscellaneousFiles workspace.

@RikkiGibson
Copy link
Member

Manual testing shows this works for F12 and Code Lens.

The toast indicating this is a misc file is back, though. I'll want to figure out how to avoid showing that until we know whether it's a file-based program or not.

@jasonmalinowski
Copy link
Member Author

@RikkiGibson Wait, this actually worked? Do you want me to undraft the PR then?

@RikkiGibson
Copy link
Member

That seems reasonable enough to me. I'll do a more thorough review pass in that case and I can open a follow up PR to do more quality of life stuff. For example, the misc files warning box does not go away, even when the file moves into the host workspace.

@jasonmalinowski
Copy link
Member Author

@RikkiGibson Was there more to do for having the virtual project to work, or right now is that working because of run-api?

@RikkiGibson
Copy link
Member

right now is that working because of run-api?

It is working now, it even works today without this change but simply treats the project reference like a metadata reference.

@jasonmalinowski jasonmalinowski force-pushed the put-file-based-programs-in-the-host-workspace branch from f4b00c7 to 2d7fd4c Compare June 20, 2025 00:52
@jasonmalinowski jasonmalinowski marked this pull request as ready for review June 20, 2025 00:52
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner June 20, 2025 00:52
@RikkiGibson RikkiGibson self-assigned this Jun 23, 2025
@RikkiGibson
Copy link
Member

RikkiGibson commented Jun 24, 2025

My main concern was that the host and misc workspace remain in coherent state as changes are made over time, and debugging thru a bit, I feel confident enough that holds.

"Demos": (sorry, I have no idea why the videos are not embedding.)

Transitioning between FBP and non-FBP:
Transitioning between FBP and non-FBP

Go to definition in other project:
Go to definition in other project

@jasonmalinowski jasonmalinowski force-pushed the put-file-based-programs-in-the-host-workspace branch 3 times, most recently from d448780 to 48ec5bb Compare June 28, 2025 00:41
This allows us to place file-based programs in the host workspace so
project-to-project references work; truly "miscellaneous files" projects
will still stay in the MiscellaneousFiles workspace.
I'm doing an assert here rather than throwing because although this
is an expectation, I don't imagine anything will be terribly wrong
for the user if it's violated. But throwing would definitely make things
bad.
@jasonmalinowski jasonmalinowski enabled auto-merge July 2, 2025 23:46
@jasonmalinowski jasonmalinowski merged commit d290451 into dotnet:main Jul 3, 2025
24 of 25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 3, 2025
@jasonmalinowski jasonmalinowski deleted the put-file-based-programs-in-the-host-workspace branch July 10, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle #:project directives in the IDE
4 participants