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

Case study: tsconfck vs get-tsconfig #262

Open
JounQin opened this issue Dec 11, 2023 · 16 comments
Open

Case study: tsconfck vs get-tsconfig #262

JounQin opened this issue Dec 11, 2023 · 16 comments

Comments

@JounQin
Copy link
Collaborator

JounQin commented Dec 11, 2023

https://github.com/dominikg/tsconfck

vs

https://github.com/privatenumber/get-tsconfig

cc @privatenumber

@JounQin JounQin changed the title Case study: tsconfck vs privatenumber Case study: tsconfck vs get-tsconfig Dec 11, 2023
@privatenumber
Copy link

Why was I tagged?

@JounQin
Copy link
Collaborator Author

JounQin commented Dec 11, 2023

Why was I tagged?

@privatenumber I don't know if you know about tsconfck, I'm currently using get-tsconfig in several projects, but it seems it's missing some features different from tsconfck, would they be supported?

@privatenumber
Copy link

privatenumber commented Dec 11, 2023

missing some features different

What are they? And why don't you open a discussion thread in get-tsconfig with a clear question instead of tagging me on multiple issues with no question?

@JounQin
Copy link
Collaborator Author

JounQin commented Dec 11, 2023

What are they?

Take references for example.

resolve "references" of solution-style tsconfig

And why don't you open a discussion thread in get-tsconfig with a clear question instead of tagging me on multiple issues with no question?

I'm sorry if I was bothering you. I was just opening the two issue in case I could forget these tasks and tagging you in case you may want to take a look at tsconfck.

@privatenumber
Copy link

Feel free to submit feature requests in get-tsconfig. However, please make ensure that your suggestions are well-detailed and with context. Your thorough input will be appreciated.

And in the future, please initiate constructive discussions in the relevant repositories. Others may have similar questions, and it's more discoverable in the appropriate places. Thanks!

@SukkaW
Copy link
Collaborator

SukkaW commented Dec 27, 2023

@JounQin Since tsconfck claims to be faster and smaller, there is no reason that why we should not replace the get-tsconfig.

In fact, I am going to replace get-tsconfig w/ tsconfck in the rollup-plugin-swc3.

@JounQin
Copy link
Collaborator Author

JounQin commented Dec 27, 2023

@SukkaW Thanks for your input, but tsconfck breaks my workflow currently described at dominikg/tsconfck#149. And I don't know if jsconfig.json is supported, see also dominikg/tsconfck#14.

cc @dominikg

@dominikg
Copy link

jsconfig.json is supported in tsconfck v3, but you need to explicitly enable it with an option, there is no automatic/hybrid mode where it looks for tsconfig.json or jsconfig.json simultaneously dominikg/tsconfck#132

tsconfck is also used by vite, and there have been previous discussions about making it available to vite plugins to avoid multiple plugins all using it with separate caches. We should start a discussion on vite discord about that maybe?

@JounQin
Copy link
Collaborator Author

JounQin commented Dec 28, 2023

@dominikg Sorry I'm not a native English speaker, I don't quite understand what do you want to discuss about? Automatically seeking jsconfig.json when tsconfig.json not found or not specific passed as option.

@JounQin
Copy link
Collaborator Author

JounQin commented Jan 4, 2024

@SukkaW Thanks for your input, but tsconfck breaks my workflow currently described at dominikg/tsconfck#149. And I don't know if jsconfig.json is supported, see also dominikg/tsconfck#14.

@SukkaW In case that my questions seem already been fixed after https://github.com/dominikg/tsconfck/releases/tag/tsconfck%403.0.1, do you want to raise to PR to replace get-tsconfig w/ tsconfck, or I'll do it when I'm free.

See also un-ts/eslint-plugin-import-x#20

@SukkaW
Copy link
Collaborator

SukkaW commented Jan 4, 2024

@SukkaW Thanks for your input, but tsconfck breaks my workflow currently described at dominikg/tsconfck#149. And I don't know if jsconfig.json is supported, see also dominikg/tsconfck#14.

@SukkaW In case that my questions seem already been fixed after https://github.com/dominikg/tsconfck/releases/tag/tsconfck%403.0.1, do you want to raise to PR to replace get-tsconfig w/ tsconfck, or I'll do it when I'm free.

See also un-es/eslint-plugin-i#20

I am also kinda busy lately. I am gonna dig through the tsconfck a little more when I can get some time.

@xsjcTony
Copy link

xsjcTony commented Oct 29, 2024

What are they?

Take references for example.

resolve "references" of solution-style tsconfig

And why don't you open a discussion thread in get-tsconfig with a clear question instead of tagging me on multiple issues with no question?

I'm sorry if I was bothering you. I was just opening the two issue in case I could forget these tasks and tagging you in case you may want to take a look at tsconfck.

Indeed! I've totally no idea before that it doesn't support references.
I recently changed my project to use the new vite template tsconfig style (with a root that only has references to other tsconfig files), and all my import plugin related resolving failed.

After wasting a lot of time digging into it, I found out that get-tsconfig's createPathsMatcher doesn't support references at all, hence I'll need to pass all my sub-tsconfig file into settings.project🤣

Looking forward to support that soon by replacing it.

cc @SukkaW


Just found out the last activity was in Janunary🫠

@SukkaW
Copy link
Collaborator

SukkaW commented Oct 29, 2024

After wasting a lot of time digging into it, I found out that get-tsconfig's createPathsMatcher doesn't support references at all, hence I'll need to pass all my sub-tsconfig file into settings.project🤣

Looking forward to support that soon by replacing it

get-tsconfig has a built-in resolver thing of sorts which is way easier to implement a resolver upon. tsconfck requires a lot of extra work.

@xsjcTony
Copy link

After wasting a lot of time digging into it, I found out that get-tsconfig's createPathsMatcher doesn't support references at all, hence I'll need to pass all my sub-tsconfig file into settings.project🤣
Looking forward to support that soon by replacing it

get-tsconfig has a built-in resolver thing of sorts which is way easier to implement a resolver upon. tsconfck requires a lot of extra work.

That's sad. Yeah indeed replacing an underlying tool is a bit complex.
Maybe it's worth mentioning in the docs that if references is used, somehow user should explicitly list their referenced sub tsconfig files into settings.project?

@SukkaW
Copy link
Collaborator

SukkaW commented Oct 30, 2024

That's sad. Yeah indeed replacing an underlying tool is a bit complex. Maybe it's worth mentioning in the docs that if references is used, somehow user should explicitly list their referenced sub tsconfig files into settings.project?

Although tsconfck does support references, it is actually also impossible to use tsconfck in eslint-import-resolver-typescript due to the lacking of the sync API: dominikg/tsconfck#183

I have raised this 3 months ago already. It was closed as not planned.

@JounQin
Copy link
Collaborator Author

JounQin commented Oct 30, 2024

synckit can be used in this case, and eslint will finally support async APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants