redhat-developer / redhat-developer/vscode-yaml
Cross-file $ref navigation stopped working
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
Cmd-clicking $ref links to other schemas using dot-prefixed relative paths used to work for links to schemas in other files, but now only works for links to other schemas within the same file.
Additionally, the VS Code built-in "Go To Definition" command (shortcut: F12) fails for all $ref links (shows "No definition found", even for local links which do still allow Cmd-click behaviour.
No relevant output is shown in the developer console or the YAML Support Output category, except in the latter on extension host startup:
[Error] (node:68398) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities. (Use "Code Helper (Plugin) --trace-deprecation ..." to show where the warning was created)
Expected Behavior
Valid relative dot-prefixed (whether ./ or ../) $ref links to schemas in other local files in the trusted workspace should be able to be followed using Cmd-click, and ideally also using VS Code's built-in "Go To Definition" command.
Current Behavior
Valid $ref relative and absolute links to other local files (including within the same trusted folder) are not resolved and do not get underline formatting, and Cmd-clicking has no effect.
Links can be made to partially work like this:
file://./other-file.yaml
or file://./../../../other-file.yaml
But this seems to be native VS Code behaviour and completely ignores the #/ part of the $ref so it's not really useful.
Steps to Reproduce
- Create the below 2 files in the same folder open in VS Code.
- Attempt to Cmd-click the different
$reflinks; the internal one should navigate to the relevant schema, the relative file link should appear without an underline and not be Cmd-clickable.
schema.yaml
# yaml-language-server: $schema=http://json-schema.org/draft-07/schema#
components:
schemas:
Item:
allOf:
- $ref: './support-models.yaml#/components/schemas/Object'
- $ref: '#/components/schemas/Item_Definition'
Item_Definition:
type: object
support-models.yaml
# yaml-language-server: $schema=http://json-schema.org/draft-07/schema#
components:
schemas:
Object:
type: object
Environment
macOS Tahoe 26.5.1
VS Code:
Version: 1.123.0
Commit: 6a44c352bd24569c417e530095901b649960f9f8
Date: 2026-06-03T11:29:03+02:00
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Darwin arm64 25.5.0
redhat.vscode-yaml:
Any version, but tested with:
1.24.2026061109
1.23.0
1.12.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided schema.yaml and support-models.yaml files in a trusted VS Code workspace, testing both Cmd-click and F12 on each $ref. Trace the extension's $ref navigation and definition-provider entry points. Done means valid ./ and ../ references to local schemas are underlined and navigable with both commands, while local links continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100