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
Change progression providers to use capabilities instead of IntelliSe…nse type. This enables them to work on both .Net core projects and legacy projects. #15935
Conversation
…nse type. This enables them to work on both .Net core projects and legacy projects.
@Pilchie @jasonmalinowski - This are the changes I was asking about. I'm not sure that I moved them to the right .Next assembly so please let me know what the right place would be if this isn't it. |
@@ -12,7 +11,7 @@ | |||
|
|||
namespace Microsoft.VisualStudio.LanguageServices.CSharp.Progression | |||
{ | |||
[GraphProvider(Name = "CSharpRoslynProvider", IntellisenseType = Guids.CSharpProjectRootIdString)] | |||
[GraphProvider(Name = "CSharpRoslynProvider", ProjectCapability = "CSharp")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be LanguageNames.CSharp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That constant resolves to C# not CSharp which is the project capability. Those constants are defined in CPS but I'm presuming that we don't really want to take a CPS dependency here just for these strings
"Microsoft.VisualStudio.Shell.Immutable.10.0": "15.0.25413-Preview5", | ||
"RoslynDependencies.Microsoft.VisualStudio.GraphModel": { | ||
"version": "15.0.25726-Preview5", | ||
"suppressParent": "all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should need suppressParent
here.
|
||
namespace Microsoft.VisualStudio.LanguageServices.CSharp.Progression | ||
{ | ||
[GraphProvider(Name = "VisualBasicRoslynProvider", ProjectCapability = "VisualBasic")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I'm not sure that we have a constant that has "VisualBasic" with no space :(
internal sealed class VisualBasicGraphProvider : AbstractGraphProvider | ||
{ | ||
[ImportingConstructor] | ||
public VisualBasicGraphProvider( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is identical to the C# one, is it possible to have a single provider instead that is tagged with both Capabilities? Doing that would make it more understandable why these are in the language neutral assembly.
If not, can you add a comment explaining why they are where they are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try it out, originally there were two (on different assemblies) so I'm presuming they were both needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single provider worked well with the or on the capability.
Also tagging the rest of @dotnet/roslyn-ide |
@dotnet/roslyn-ide - Can someone shed some light on how this part is supposed to work: 14:25:23 Verifying project.json contents I didn't see any RepoData.json in the enlistment so I'm guessing this is a build machine thing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
"Microsoft.VisualStudio.Shell.Immutable.10.0": "15.0.25413-Preview5", | ||
"RoslynDependencies.Microsoft.VisualStudio.GraphModel": { | ||
"version": "15.0.25726-Preview5", | ||
"suppressParent": "all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't think you want suppressParent
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pilchie is right, suppress parent isn't needed.
Why isn't this being delivered via NuGet? Looks like it's on MyGet instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove it, I added it back seeing if that would fix the other issue.
The RepoUtil config is at build/config/RepoUtilData.json. You'll need to add this to the @jaredpar any chance you could include the config path in the errors? @RaulPerez1 any ideas how to make the error message more actionable? |
@Pilchie - This is what I would write in that error message: The versions must be the same or one must be explicitly listed as fixed under fixedPackages in build\config\RepoUtilData.json You may not even need the full path there, if it had mentioned RepoUtilData.json I could have found it and figured it out from there. @jaredpar - If the question was for me, no idea. I just added the dependency as it was from the other project but with the Preview3 version. |
@@ -7,6 +7,7 @@ | |||
"System.Collections.Immutable": "1.1.36", | |||
"Microsoft.VisualStudio.CoreUtility": [ "14.3.25407", "15.0.25726-Preview5" ], | |||
"Microsoft.VisualStudio.Editor": [ "14.3.25407", "15.0.25726-Preview5" ], | |||
"Microsoft.VisualStudio.GraphModel": [ "14.3.25407", "15.0.25726-Preview5" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this package uploaded to? I didn't see it on NuGet.org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll follow up with the owners and get back to you on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RaulPerez1 if you rebase off of this PR you shouldn't need any changes here #16305
"version": "15.0.25726-Preview5", | ||
"suppressParent": "all" | ||
} | ||
"RoslynDependencies.Microsoft.VisualStudio.GraphModel": "15.0.25726-Preview5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package name doesn't line up with the entries in the config file. Typo?
Customer scenario
.Net core projects don't implement IntelliSense type so progression features don't work in those (i.e. seeing the types in a file in solution explorer)
Bugs this fixes:
dotnet/project-system#592
Workarounds, if any
No workarounds
Risk
Low. No actual changes to the code here other than move the provider to use capabilities instead of IntelliSense type on the MEF export.
Performance impact
Low - See above for details.
Is this a regression from a previous update?
Not a regression.
Root cause analysis:
Not a bug in Roslyn per-se. The change to support capabilities was added to progression in Dev15.
How was the bug found?
Dogfooding