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

add generateTrace to tsconfig's compilerOptions #59617

Closed
6 tasks done
dimitropoulos opened this issue Aug 13, 2024 · 2 comments Β· Fixed by #59636
Closed
6 tasks done

add generateTrace to tsconfig's compilerOptions #59617

dimitropoulos opened this issue Aug 13, 2024 · 2 comments Β· Fixed by #59636

Comments

@dimitropoulos
Copy link
Contributor

dimitropoulos commented Aug 13, 2024

πŸ” Search Terms

generateTrace analyze-trace @typescript/analyze-trace

βœ… Viability Checklist

⭐ Suggestion

Would a PR be accepted to add generateTrace (the existing CLI option) to the tsconfig.json's compilerOptions? Similar to generateCpuProfile being in both the CLI and the config.

πŸ“ƒ Motivating Example

I am making a monorepo tool that will attempt to generate traces and leverage the analyze-trace tool to give users information about hotspots in their monorepo. Adding this to the tsconfig makes what this tool is trying to do a lot easier: monorepos may have hundreds of "typecheck": "tsc" package.json scripts, and it may not be feasible or desirable to modify them all.

πŸ’» Use Cases

  1. What do you want to use this for?
    metaprogramming for monorepo library diagnositcs

  2. What shortcomings exist with current approaches?
    Adding the CLI flag requires more complexity to support different package managers (yarn, pnpm, npm, etc.), whereas if a compilerOption existed, it'd be easier.

  3. What workarounds are you using in the meantime?
    In a repo I'm working with that has 500+ packages, I'm using find-and-replace to modify the typecheck commands in each package.

@RyanCavanaugh
Copy link
Member

@sheetalkamat any concerns if we do this? Seems fine to me

@dimitropoulos
Copy link
Contributor Author

dimitropoulos commented Aug 15, 2024

@RyanCavanaugh @sheetalkamat hopefully it's not too presumptuous but I suddenly realized how quickly the 5.6 release is approaching (wow!) and given how small this change is I'm really hoping there's a way to fit it in while it's still Beta season: #59636

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

Successfully merging a pull request may close this issue.

2 participants