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

refactor: make readConfigFile synchronous #18

Merged
merged 2 commits into from
Dec 29, 2024
Merged

refactor: make readConfigFile synchronous #18

merged 2 commits into from
Dec 29, 2024

Conversation

mizdra
Copy link
Owner

@mizdra mizdra commented Dec 29, 2024

Currently, the code generator is written in ESM. On the other hand, the entry point for ts-plugin is written in CJS. Therefore, ts-plugin loads code generator modules via dynamic import.

Dynamic import is an asynchronous API. Therefore, ts-plugin uses createAsyncLanguageServicePlugin for initialisation. However, there are some problems with createAsyncLanguageServicePlugin.

To work around these, we would like to initialise ts-plugin synchronously. So, first of all, we want to make config loading synchronous.

@mizdra mizdra merged commit 6dc8675 into main Dec 29, 2024
6 checks passed
@mizdra mizdra deleted the read-config-sync branch December 29, 2024 10:20
@mizdra mizdra mentioned this pull request Dec 29, 2024
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