Skip to content

refactor: port to oxc - #803

Draft
nathanwhit wants to merge 11 commits into
denoland:mainfrom
nathanwhit:oxc-port
Draft

nathanwhit wants to merge 11 commits into
denoland:mainfrom
nathanwhit:oxc-port

Conversation

@nathanwhit

Copy link
Copy Markdown
Member

@deno-cla-assistant

deno-cla-assistant Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Deno Individual Contributor License Agreement

All contributors have signed the CLA. Thank you!

Re-run CLA check


This is an automated message from CLA Assistant

Ports the swc-based changes from main onto the oxc code: heritage member
docs (denoland#842), variable alias resolution (denoland#850), shadowed export merging
(denoland#838), spread element inference (denoland#852), void return inference for arrow
functions (denoland#825), deno-doc-ignore directives (denoland#829), identifier diagnostic
locations (denoland#831), pure type alias re-exports (denoland#816).

Adapts to oxc 0.155 (ExportNamedDeclaration / TSModuleDeclaration splits,
Class heritage, TSIndexSignature parameter, JSStr string values) and
Rust 1.97.

Spec expectation changes: object literal computed keys render as `[t]`
rather than `[[t]]`; `export * as ns` symbols are located at the
statement start; a private const spread into an exported `as const`
array is reported as a private-type-ref (deno_graph now tracks value
deps of `as const` expressions); an `infer R` binding no longer links
to an unrelated type parameter.
- resolve_type_ref: a reference that semantic analysis bound to a
  non-module-level symbol (type parameter, mapped type parameter) or that
  was never analyzed (JSDoc type strings) is a typeParam resolution, and an
  `infer X` binding is unresolved, matching swc's resolver behavior
- JSDoc types keep their resolutions (clear_resolutions removed)
- computed property keys keep their source text including brackets
- destructured bindings get their types from the referenced variable's
  annotation (scope-aware lookup) and inferred initializer types
- restore main's test expectations
…expect-error

- nested namespace declarations are located at the outer `namespace`
  keyword (the symbol declaration range) like with swc
- columns count a tab as the indent width again via deno_ast's new
  `line_and_column_display_with_indent_width`
- pin deno_graph/deno_ast to the latest oxc-port revisions

The two html snapshots that linked the `R` of `infer R ? R : any` to an
unrelated construct signature type parameter are re-blessed: that link
came from an swc scope leak and the unlinked output matches TypeScript
semantics and main's behavior for every other `infer` binding.
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.

2 participants