Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #145.
Summary
Wires the
rslint/typeServiceJSON-RPC transport and late-retirement handling in the lint worker so type-aware ESLint plugins work once a project installs@rslint/core >= 0.11.0, while remaining backwards-compatible with existing@rslint/corereleases (>= 0.8.0).sequenceDiagram participant Go as Go rslint --lsp participant Worker as Lint worker participant Pool as PluginLintPool participant Host as PluginLintHost Go->>Worker: rslint/pluginLint (files, typeServices, retiredTypeServices) Worker->>Pool: lint(request, token, typeServiceTransport) alt late retirement-only (files=[] & retiredTypeServices non-empty) on evicted/hostless generation Pool-->>Go: { results: [] } else active host Pool->>Host: lint(request, signal, undefined, typeServiceTransport) Host->>Worker: typeServiceTransport(req, abortSignal) Worker->>Go: rslint/typeService (bridged CancellationToken / $/cancelRequest) Go-->>Worker: TypeServiceHostResponse Worker-->>Host: response verbatim Host-->>Go: EslintPluginLintResult endStill tracked in #145 once
@rslint/core@0.11.0is published:@rslint/coredevDependency inpackages/vscode/package.jsonto^0.11.0and drop the<0.11.0fallback type alias.packages/vscode/e2e/lint/suite-eslint-plugins/eslint-plugins.test.ts.Evidence
PluginLintPool.lintcalledhost.lint(request, signal)without aTypeServiceHostTransport,runLintWorkerdid not forwardrslint/typeService, and retirement-onlyrslint/pluginLintrequests for evicted or hostless generations threw.pnpm fmt:check: passed (237 files).pnpm lint(rs lint --type-check): passed (207 files, 22 rules).pnpm test:unit: 41 test files passed, 429 tests passed (including 3 newPluginLintPoolcases and 3 newcreateTypeServiceTransportJSON-RPC cases).pnpm build: extension, worker, and lint-worker bundles built cleanly.web-infra-dev/rslintorigin/main(f5e24ff6d) verification (built Gorslintbinary +@rslint/coreJS/.d.tsin an isolated temp clone):@rslint/core.d.ts: 0 diagnostics (PluginTypeServiceTransportresolves directly toTypeServiceHostTransport).packages/vscode/dist/lint-worker.js --lsp --core <built-rslint>with a cross-file type-aware ESLint plugin callingcontext.sourceCode.parserServices.program.getTypeChecker():SecretTokentype ondidOpenand published the expected diagnostic.didChange.didChangeedits (cancellation + session retirement).rslint.config.mjsreload (error->warn) viarslint/configRefresh,didClose,shutdown, and clean exit (code 0) with zero generation/host/parserServices errors.@rslint/core@0.10.1):VSCODE_CLI=1 RSTACK_LINT_E2E_SUITES="eslintPlugins,Plugin-host failure" pnpm test:e2e smoke lintpassed against real VS Code 1.148.0 (smoke,eslintPlugins tests,Plugin-host failure tests).Merge Danger
Door: two-way
Purely additive wiring inside the lint worker; trivial to revert or adjust if
@rslint/core@0.11.0changes its pre-release contract before publish.Blast Radius: Narrow
Scoped to the lint worker's
rslint/pluginLintpath. Older Rslint cores (0.8.x–0.10.x) ignore the 4th argument tohost.lint, never invoketypeServiceTransport, and never sendretiredTypeServices, so existing runtimes are unaffected.