Skip to content
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

Expose CSharpSyntaxFactsService.Instance #38078

Closed
JohanLarsson opened this issue Aug 17, 2019 · 4 comments
Closed

Expose CSharpSyntaxFactsService.Instance #38078

JohanLarsson opened this issue Aug 17, 2019 · 4 comments
Labels
Area-IDE Concept-API This issue involves adding, removing, clarification, or modification of an API. Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on.

Comments

@JohanLarsson
Copy link

It contains useful helpers for third party analyzers.

@CyrusNajmabadi
Copy link
Member

What helpers would you like to see exposed?

@JohanLarsson
Copy link
Author

Oh, you are right, did not look close at it. Most of the methods does not look terribly useful.

  • CSharpSyntaxFactsService.IsInStaticContext()
  • CSharpSemanticFactsService.IsInExpressionTree

^ are two I find myself reimplementing over and over. Maybe better with separate issues for things I want exposed.

Above is not a complete list, have to scan through it some time.

@jmarolf
Copy link
Contributor

jmarolf commented Aug 19, 2019

Maybe better with separate issues for things I want exposed.

This sounds like a good approach. ISyntaxFactsService.cs is just a set of helpers and has not been designed as a public API. If there is a function you find yourself needing then we should try and find a way to provide it, but I don't think exposing SyntaxFacts is the corrrect approach.

@sharwell sharwell added Area-IDE Concept-API This issue involves adding, removing, clarification, or modification of an API. Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on. labels Aug 19, 2019
@sharwell
Copy link
Member

sharwell commented Aug 19, 2019

ISyntaxFactsService.cs is just a set of helpers and has not been designed as a public API. If there is a function you find yourself needing then we should try and find a way to provide it

This is a very good statement on the current implementation. @JohanLarsson I'm going to close this issue as Won't Fix (since it will help people in the future understand why this type is not public API), but if you find yourself in need of specific features from this service please do open a more specific issue. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-API This issue involves adding, removing, clarification, or modification of an API. Resolution-Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on.
Projects
None yet
Development

No branches or pull requests

4 participants