Skip to content

Enhancement(typescript-estree): expose ProjectService logs through plugin #9321

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

Closed
4 tasks done
higherorderfunctor opened this issue Jun 10, 2024 · 2 comments · Fixed by #9337
Closed
4 tasks done
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Milestone

Comments

@higherorderfunctor
Copy link
Contributor

higherorderfunctor commented Jun 10, 2024

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

typescript-estree

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

I propose we expose ProjectService logs through this plugin using the DEBUG environment variable.

There are 3 log channels and the unused event handler, so I'm thinking something along the lines of below. This would help trace ProjectService behavior and diagnose related issues.

typescript-eslint:typescript-estree:tsserver:err
typescript-eslint:typescript-estree:tsserver:info
typescript-eslint:typescript-estree:tsserver:perf
typescript-eslint:typescript-estree:tsserver:event

Additional Info

Follow up issue from the discussion at #8835 (comment).

@higherorderfunctor higherorderfunctor added enhancement New feature or request triage Waiting for team members to take a look labels Jun 10, 2024
@higherorderfunctor higherorderfunctor changed the title expose ProjectService logs through plugin Enhancement(typescript-estree): expose ProjectService logs through plugin Jun 10, 2024
@higherorderfunctor
Copy link
Contributor Author

higherorderfunctor commented Jun 11, 2024

Question after starting the implementation. Would it be better to:

  1. Not share the typescript-eslint prefix (e.g., DEBUG=typescript-eslint:*,tsserver:*) and document the new prefix.
  2. Use a common prefix and document how to filter (e.g., DEBUG='typescript-eslint:*,-typescript-eslint:typescript-estree:tsserver:info)

In the branch I am working on I currently have:

typescript-eslint:typescript-estree:tsserver:err
typescript-eslint:typescript-estree:tsserver:info
typescript-eslint:typescript-estree:tsserver:perf
typescript-eslint:typescript-estree:tsserver:event

Linting one file of about ~400 lines in a good size monorepo produced 9,000 lines of log output with just typescript-eslint:typescript-estree:tsserver:* as a reference point.

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Jun 13, 2024
@JoshuaKGoldberg JoshuaKGoldberg added this to the 8.0.0 milestone Jun 17, 2024
@JoshuaKGoldberg
Copy link
Member

#9337 was merged into the v8 branch. ✅

@github-actions github-actions bot added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Jun 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Projects
None yet
2 participants