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

Question? Do we want to encurrage the usage of this API for statistsics and the like? #7

Closed
xFrednet opened this issue Jul 29, 2021 · 4 comments

Comments

@xFrednet
Copy link
Member

Having a stable rustc API that is used for linting could also be abused to create statistics about the code in a nice and future prove manner. For example, Rust and Clippy both use such code to extract lint documentation and I can easily think of other statistics and documentation that could be collected using this API. Do we want to support and even encourage this behavior?

The main blocker for this is probably the plan to sandbox the lint execution (which I'm in favor of). Supporting this could probably as simple as providing an additional interface to write collected data to a file.

@jhpratt
Copy link
Member

jhpratt commented Jul 30, 2021

I wouldn't expect this to be included in any form as part of the linter. The stable wrapper over the internal API? I could see it being used that way, but I'm not sure we should specifically tailor to that use case at first.

@flip1995
Copy link

We shouldn't discourage any usage of the API, but only encourage the correct usage of the API. If people are creative and use the API in another way than intended, I'm ok with this, as long as we're clear what we actively support. So if someone opens an issue "I used this in a way that was never intended and something didn't work", we can just close this issue, since we don't support every use case out there. But I don't see a reason to discourage people from experimenting and limit testing.

@jhpratt
Copy link
Member

jhpratt commented Jul 30, 2021

^^ pretty much. Use and abuse as you wish, but it's not our problem if something doesn't work for your exact use case.

@jhpratt
Copy link
Member

jhpratt commented Aug 2, 2021

@xFrednet 👍'd the comments so I presume they are in agreement. Resolving in favor of "do what you want, but we're not going to support other use cases".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants