-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
refactor: reorganize TS compiler #5603
refactor: reorganize TS compiler #5603
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far... let me know if you want/need anything
@kitsonk I want TS worker to not use any console logs - so I want to move EDIT: |
That is going to be hard-ish because it relies on
They aren't shady! :-) I am not too sure we want to move them, because they are tightly coupled to how TypeScript generates the bundle (as in you have to "guess" at what the module specifiers are going to be because of this: microsoft/TypeScript#35052). They should go when we move the bundle generation out to Rust (as in all we do is take the single outfile and do the munging in Rust) which doesn't seem like we are ready to do that quite yet. |
I see, thanks for explanation I couldn't really grok what they are for.
How would it take? I already do some munching on source maps generated during runtime code compilation so that shouldn't be a big deal. |
@bartlomieju the JSONC parser is here: https://github.com/dprint/jsonc-parser I just recently added the https://docs.rs/jsonc-parser/0.7.0/jsonc_parser/fn.parse_to_value.html |
@ry let's land this PR for 1.0.1 |
@@ -673,7 +632,7 @@ function buildSourceFileCache( | |||
} | |||
} | |||
|
|||
interface EmmitedSource { | |||
interface EmittedSource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are all private interfaces not visible to end users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - nice clean up
Yet another refactor of TS compiler:
bundle()
a standalone function instead of method ofTsCompiler
Fixes #5507