Skip to content

Conversation

davidwengier
Copy link
Member

Mostly fixes #11942

We still currently get "Couldn't get code document" errors when the source generator is hooked up, but didn't run, but I'm leaving that because it should be fixed by #11972, and if it isn't then we either want to know, or can add handling of it in then.

Commit-at-a-time is probably easiest, mostly because the 2nd commit changes every cohost endpoint to inherit from a new base class, so it's pretty noisy.

@davidwengier davidwengier requested review from a team as code owners June 26, 2025 03:35
@davidwengier davidwengier removed the request for review from a team June 26, 2025 04:06
Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I'm specifically requesting changes in PathUtilities.

The test failures appear to be real. Also, because the test failures are Windows-only, it highlights a growing problem that our co-hosting tests require NetFx and don't on Mac or Linux. That's a test hole that needs to be addressed. Is there an issue tracking it?


if (vsHierarchy.GetProjectFilePath(_jtf) is { } projectFilePath)
{
_cachedCapabilities = _cachedCapabilities.SetItem((projectFilePath, capability), isMatch);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this cache get invalidated if the project is reloaded -- for example, if the user does a git pull and capabilities change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't. As below, this is not intended for critical uses (and i've updated the comments to reflect that).

@davidwengier
Copy link
Member Author

davidwengier commented Jun 27, 2025

Also, because the test failures are Windows-only, it highlights a growing problem that our co-hosting tests require NetFx and don't on Mac or Linux. That's a test hole that needs to be addressed. Is there an issue tracking it?

I don't disagree, this is something that has been annoying me for a bit too, and is on my list. I will formalize it into an issue though, for sure. Having said that, for the record, the test failure has nothing to do with being Windows only, it's just me not re-running all tests after a change.

@davidwengier
Copy link
Member Author

Updated with a full implementation of GetDirectoryName and its tests. We might be philosophically opposed on the capability match cache, happy to chat about it next week if its easier.

Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PathUtilities.GetDirectoryName(...) changes!

@davidwengier davidwengier merged commit ed209e5 into dotnet:main Jul 1, 2025
11 checks passed
@davidwengier davidwengier deleted the GracefullyCohost branch July 1, 2025 03:00
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 1, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 20, 2025
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.

Gracefully degrade when the source generated document isn't available
4 participants