-
-
Notifications
You must be signed in to change notification settings - Fork 69
rspack-resolver was breaking change #405
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
Comments
Misread this dep as in the recent patch version, but I see now added in v4. I suppose everything is about tradeoffs, but as a data point, the speed improvement here was minuscule (completely unnoticeable in a very very large codebase) but the new lack environment agnosticism is deeply annoying. |
What platform are you using? We'll target more platforms recently. |
Please help to try
|
Why should we need anything other than a javascript interpreter to run a javascript library?
Not to mention the supply chain / security concerns shipping compiled binaries raises.
Your lib. But poor choice, for very little gain IMO. Hope the community moves in a different direction. Sad v4 broke a good thing.
…On Wed, Mar 26, 2025, at 12:47 AM, JounQin wrote:
Please help to try ***@***.***` which adds new 4 targets support:
• `i686-pc-windows-msvc`
• `armv7-unknown-linux-musleabihf`
• `powerpc64le-unknown-linux-gnu`
• `s390x-unknown-linux-gnu`
—
Reply to this email directly, view it on GitHub <#405 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AATQYQ4MMEM5QLCOIJDAIFD2WI5PHAVCNFSM6AAAAABZYVTIZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJTGMYTAMRRG4>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
JounQin*JounQin* left a comment (import-js/eslint-import-resolver-typescript#405) <#405 (comment)>
Please help to try ***@***.***` which adds new 4 targets support:
• `i686-pc-windows-msvc`
• `armv7-unknown-linux-musleabihf`
• `powerpc64le-unknown-linux-gnu`
• `s390x-unknown-linux-gnu`
—
Reply to this email directly, view it on GitHub <#405 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AATQYQ4MMEM5QLCOIJDAIFD2WI5PHAVCNFSM6AAAAABZYVTIZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJTGMYTAMRRG4>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
It replaces slow
It's open sourced at https://github.com/unrs/unrs-resolver All releases are provenanced: https://www.npmjs.com/package/unrs-resolver ![]() |
By the way, there are a lot of frontend toolchains built on top of rust/napi-rs nowdays.
And don't forget the new |
Of course there's room for total replacement/revolutionary native tooling in the ecosystem. I love vite, for example.
The problem is: this ain't that. This is some rust bolted onto an eslint helper that broke an eslint setup thats worked for nearly three years without an issue through two major ESLint versions. For no perceivable performance gain. And now I need to worry about the arch of the machines I'd put it on.
No thanks!
Call me when all of eslint is re-written into something with better perf.
I don't find this discussion very productive by the way. Mostly here to report:
1. This broke our stuff, due to the native code dependency.
2. Won't be using it.
3. Leave a trail for other people who might be experiencing similar issues with previously-working code.
Good luck!
…On Wed, Mar 26, 2025, at 1:48 AM, JounQin wrote:
By the way, there are a lot of frontend toolchains built on top of rust/napi-rs nowdays.
• `rspack`
• `oxc`
• `biome`
• `rolldown`
• `farm`
• ...
—
Reply to this email directly, view it on GitHub <#405 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AATQYQ3WFIVPPUFYPJQA3R32WJEVDAVCNFSM6AAAAABZYVTIZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJTGM4TMMBSHA>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
JounQin*JounQin* left a comment (import-js/eslint-import-resolver-typescript#405) <#405 (comment)>
By the way, there are a lot of frontend toolchains built on top of rust/napi-rs nowdays.
• `rspack`
• `oxc`
• `biome`
• `rolldown`
• `farm`
• ...
—
Reply to this email directly, view it on GitHub <#405 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AATQYQ3WFIVPPUFYPJQA3R32WJEVDAVCNFSM6AAAAABZYVTIZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJTGM4TMMBSHA>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
That's why it's a major v4 version? For performance, are you using The v3 resolver interface of https://github.com/un-ts/eslint-plugin-import-x would provide much better performance in case you didn't know. // eslint.config.js, CommonJS is also supported
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
export default [
{
settings: {
'import-x/resolver-next': [
createTypeScriptImportResolver({
alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
bun: true, // resolve Bun modules https://github.com/import-js/eslint-import-resolver-typescript#bun
// Choose from one of the "project" configs below or omit to use <root>/tsconfig.json or <root>/jsconfig.json by default
// use <root>/path/to/folder/tsconfig.json or <root>/path/to/folder/jsconfig.json
project: 'path/to/folder',
// Multiple tsconfigs/jsconfigs (Useful for monorepos, but discouraged in favor of `references` supported)
// use a glob pattern
project: 'packages/*/{ts,js}config.json',
// use an array
project: [
'packages/module-a/tsconfig.json',
'packages/module-b/jsconfig.json',
],
// use an array of glob patterns
project: [
'packages/*/tsconfig.json',
'other-packages/*/jsconfig.json',
],
}),
],
},
},
] There are also users feedback positive performance improve like #376 (comment) I'd love to but can't help with your personally workspace for performance without reproduction. |
I am also being affected by this rspack-resolver dependency issue out of nowhere. The error is extremely unhelpful, I'm glad that @pckilgore created this issue or I just would have thought some weird native binding issue was happening in my Github CI workflow.
eslint-import-resolver-typescript/package.json Lines 83 to 91 in a4a65dd
@JounQin This dependency change was published in I was able to fix this by overriding the dependency in my package.json back to 3.5.2 "eslint-import-resolver-typescript": "3.5.2", There is probably a later version that will also work but I haven't tried. |
@jgable Sorry for this first, but that doesn't mean to be a breaking change, we still support By the way, what's the unhelpful error exactly? |
I will work on a repro today. This is happening on a Github action running on ubuntu-latest with Next 14 -> eslint-config-next. The unhelpful error is I've tried specifying |
@jgable That seems a new target, please provide more arch/platform info. |
also facing this issue with the same error on Amazon Linux 2 Error is Oops! Something went wrong! :(
ESLint: 9.16.0
Error: Failed to load native binding
Occurred while linting /local/p4clients/pkgbuild-const/workspace/src/<redacted>/test/client.test.ts:1
Rule: "import/namespace"
at Object.<anonymous> (/local/p4clients/pkgbuild-const/workspace/src//<redacted>/node_modules/unrs-resolver/index.js:372:11)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/local/p4clients/pkgbuild-const/<redacted>/src/<redacted>/node_modules/eslint-import-resolver-typescript/lib/index.cjs:12:20)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10) |
@ckifer Could be provide more useful info by debugging https://unpkg.com/[email protected]/index.js? And in the meantime, you can use the wasi version for workaround by {
"overrides": {
"unrs-resolver": "npm:@unrs/resolver-binding-wasm32-wasi@latest"
}
} cc @jgable |
@JounQin thanks! For now we just downgraded to 3.9.0. The update to 3.10.0 is what breaks us https://github.com/import-js/eslint-import-resolver-typescript/releases/tag/v3.10.0 (moving to Is there anything specific I should look for while debugging |
Yeah, first we need to know what your expected target platform by adding some logging to check in which condition it fails. |
@JounQin
I set
To me it just seems like the |
They are all optional, because a correct platform/target related package will be installed automatically normally, but with |
What if you install |
Works like a charm if I install it manually
but I also need to build it on MacOS which fails with
|
@ckifer So that means you package manager doesn't install
It seems |
Hmm I can't install the latest node and I can't use other package managers because this is company internal, I can only install up to 10.x but I'll try that |
I'm about to unsub from this, but hey @ckifer, appreciate your work on recharts. We've been fine since downgrading to a version that runs with just a node interpreter.
|
Yeah, a think a new issue for this makes sense. @ckifer |
Sorry for the notifications @pckilgore! Will probably end up just doing the same at this point 🙃. Agree with your thoughts above on this. And thanks for the shoutout 🙌🏼 @JounQin with npm 10.x I get the same errors |
In the meantime, you can use |
As of a recent version upgrade using rspack-resolver, the
no-restricted-paths
lint is breaks. Previously no native code was required to be run.The text was updated successfully, but these errors were encountered: