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

Use jsonc-parser instead of LKG compiler in build #26

Closed

Conversation

jakebailey
Copy link
Owner

@jakebailey jakebailey commented Sep 28, 2022

Profiling the build roughly half of the time spent loading the
build is spent importing typescript.js, for this one function.

Since this stack is already adding required devDependencies, switch
readJson to use jsonc-parser (published by the VS Code team), rather
than importing the entire LKG typescript.js library.


Please do not comment on this PR. Depending on how this set of PRs evolves, this PR's contents may change entirely based on the order of commits.

This PR is a part of a stack:

  1. Make a few changes to allow all code to be loaded as one project
  2. Explicitly reference ts namespace in tsserverlibrary
  3. Generated module conversion step - unindent
  4. Generated module conversion step - explicitify
  5. Generated module conversion step - stripNamespaces
  6. Generated module conversion step - inlineImports
  7. Generated module conversion step - .git-ignore-blame-revs
  8. Add gitlens settings suggestion
  9. Make processDiagnosticMessages generate a module
  10. Fix up linting, make lint clean
  11. Undo changes needed to load codebase into ts-morph
  12. Add JSDoc eslint rule
  13. Fix all internal JSDoc comments
  14. Convert require calls to imports
  15. Remove typescriptServices, protocol.d.ts, typescript_standalone.d.ts
  16. Get codebase building pre bundling
  17. Add build via esbuild
  18. Add dts bundling
  19. Consolidate checks that test if the current environment is Node
  20. Add ts to globalThis in run.js for convenience during debugging
  21. Rename Gulpfile to Herebyfile for improved git diff
  22. Change build system to hereby
  23. Update baselines for corrected line endings in lib files
  24. Use jsonc-parser instead of LKG compiler in build (this PR)
  25. Modernize localize script, use new XML library
  26. Don't use needsUpdate for quick tasks
  27. Remove mkdirp
  28. Export ts namespace from tsserver for hacky-post patching
  29. Directly import namespaces for improved esbuild output
  30. Ensure ts object passed to plugins contains deprecatedCompat declarations
  31. Move compiler-debug into Debug namespace, which allows the compiler to be tree shaken
  32. Remove Promise redeclaration
  33. Remove globalThisShim and globalThis modification for TypeScriptServicesFactory
  34. Disable slow CodeQL queries
  35. Remove outFiles from launch.json
  36. Remove dynamicImport and setDynamicImport

@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 6dac7c1 to edb57ce Compare September 28, 2022 22:04
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 2c19997 to 9028920 Compare September 28, 2022 22:04
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from edb57ce to b0cf9f5 Compare October 3, 2022 21:41
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 9028920 to 6d3661d Compare October 3, 2022 21:41
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from b0cf9f5 to 119e8e2 Compare October 3, 2022 23:34
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 6d3661d to b066bd6 Compare October 3, 2022 23:34
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 119e8e2 to b51bb17 Compare October 4, 2022 17:59
@jakebailey jakebailey changed the title Remove instrumenter Clean up some TODOs Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from b066bd6 to 1f08f8c Compare October 4, 2022 17:59
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from b51bb17 to b71a1dd Compare October 4, 2022 19:06
@jakebailey jakebailey changed the title Clean up some TODOs Ensure all projects are listed in root tsconfig.json Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 1f08f8c to 072f98b Compare October 4, 2022 19:06
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from b71a1dd to 64c42a5 Compare October 4, 2022 19:53
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 072f98b to 497c663 Compare October 4, 2022 19:53
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 64c42a5 to b77418d Compare October 4, 2022 21:02
@jakebailey jakebailey changed the title Ensure all projects are listed in root tsconfig.json Clean up some TODOs Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 497c663 to 792b782 Compare October 4, 2022 21:02
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from b77418d to a02e266 Compare October 4, 2022 22:19
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 792b782 to 0f369f3 Compare October 4, 2022 22:19
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from a02e266 to 03c218e Compare October 4, 2022 22:49
@jakebailey jakebailey changed the title Clean up some TODOs Add ts to globalThis for convenience during debugging Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 0f369f3 to 9f5b4d3 Compare October 4, 2022 22:49
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 03c218e to 4a86b4c Compare October 4, 2022 23:14
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 9f5b4d3 to 751f57a Compare October 4, 2022 23:14
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 4a86b4c to 0fb1ba9 Compare October 4, 2022 23:35
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 751f57a to 6578dbb Compare October 4, 2022 23:35
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 0fb1ba9 to e9d7918 Compare October 6, 2022 18:35
@jakebailey jakebailey changed the title Add ts to globalThis for convenience during debugging Restore self-compilation using built compiler in CI tests Oct 6, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 6578dbb to 48673d2 Compare October 6, 2022 18:35
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from e9d7918 to 38e1f6f Compare October 7, 2022 18:34
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 1d5bed3 to c28d68c Compare October 24, 2022 23:15
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 2c74e88 to 2ec34bf Compare October 25, 2022 02:24
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from c28d68c to a9b166d Compare October 25, 2022 02:24
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 2ec34bf to 10fbfc8 Compare October 27, 2022 04:25
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from a9b166d to b52815c Compare October 27, 2022 04:26
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 10fbfc8 to 2b8cf0b Compare October 27, 2022 17:43
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from b52815c to 8431802 Compare October 27, 2022 17:44
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 2b8cf0b to c113f79 Compare October 28, 2022 02:26
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 8431802 to 57d2fef Compare October 28, 2022 02:26
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from c113f79 to 0c6b69c Compare October 31, 2022 21:36
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 57d2fef to f73c69a Compare October 31, 2022 21:37
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 0c6b69c to fbcfb3b Compare November 2, 2022 00:47
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from f73c69a to b033d0c Compare November 2, 2022 00:47
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from fbcfb3b to 03dc75c Compare November 2, 2022 16:59
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from b033d0c to 9f8832c Compare November 2, 2022 16:59
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 03dc75c to ca31a4b Compare November 2, 2022 19:49
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 9f8832c to 25e6634 Compare November 2, 2022 19:49
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from ca31a4b to 5117c83 Compare November 6, 2022 21:53
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 25e6634 to 6e69116 Compare November 6, 2022 21:53
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 5117c83 to 017ae89 Compare November 6, 2022 21:58
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 6e69116 to 6715a98 Compare November 6, 2022 21:58
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 017ae89 to 25958b6 Compare November 7, 2022 03:54
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 6715a98 to c497480 Compare November 7, 2022 03:54
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 25958b6 to 147cd71 Compare November 7, 2022 19:28
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from c497480 to 058b59f Compare November 7, 2022 19:28
@jakebailey jakebailey force-pushed the transform-stack-commit-23 branch from 147cd71 to b520f09 Compare November 7, 2022 21:38
Profiling the build roughly half of the time spent loading the
build is spent importing typescript.js, for this one function.

Since this stack is already adding required devDependencies, switch
readJson to use jsonc-parser (published by the VS Code team), rather
than importing the entire LKG typescript.js library.
@jakebailey jakebailey force-pushed the transform-stack-commit-24 branch from 058b59f to fe08021 Compare November 7, 2022 21:38
@jakebailey jakebailey closed this Nov 7, 2022
@jakebailey jakebailey deleted the transform-stack-commit-24 branch November 7, 2022 23:55
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 this pull request may close these issues.

1 participant