Skip to content

languages: Fix local path of JSON and YAML schemas#44794

Merged
ConradIrwin merged 2 commits intozed-industries:mainfrom
belltoy:fix/json-yaml-schemas-path
Feb 12, 2026
Merged

languages: Fix local path of JSON and YAML schemas#44794
ConradIrwin merged 2 commits intozed-industries:mainfrom
belltoy:fix/json-yaml-schemas-path

Conversation

@belltoy
Copy link
Contributor

@belltoy belltoy commented Dec 14, 2025

Closes #30938

Release Notes:

This patch follows the vscode LSP client logic, see jsonClient.ts. The url of the JSON schemas settings and the YAML schemas settings should be resolved to an absolute path in the LSP client when it is submitted to the server.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 14, 2025
@maxdeviant maxdeviant changed the title fix: fix local path of JSON and YAML schemas (#30938) languages: Fix local path of JSON and YAML schemas Dec 14, 2025
@belltoy belltoy force-pushed the fix/json-yaml-schemas-path branch from b75405f to a81787a Compare December 14, 2025 04:38
@belltoy belltoy force-pushed the fix/json-yaml-schemas-path branch 2 times, most recently from bbf0ec0 to 68f7b22 Compare January 19, 2026 02:05
@belltoy
Copy link
Contributor Author

belltoy commented Jan 19, 2026

This is ready for review.

@belltoy belltoy force-pushed the fix/json-yaml-schemas-path branch 2 times, most recently from b60c1e2 to dfa5e62 Compare January 19, 2026 08:53
@belltoy
Copy link
Contributor Author

belltoy commented Jan 24, 2026

@miguelraz @maxdeviant Do you have time to review this PR? Thanks!

@ConradIrwin
Copy link
Member

@belltoy thanks for this, and sorry for the glacial reply.

I think this functionality looks good, but:

  1. If the path already starts with / it is absolute, so we shouldn't do anything.
  2. resolve_executable_path sounds wrong. Can we replace the leading dot by the worktree_root instead?

@ConradIrwin ConradIrwin self-assigned this Feb 5, 2026
@belltoy belltoy force-pushed the fix/json-yaml-schemas-path branch from dfa5e62 to 8546b80 Compare February 7, 2026 01:54
@belltoy
Copy link
Contributor Author

belltoy commented Feb 7, 2026

Thank you for reviewing, @ConradIrwin.

You're right. I've updated this patch.

@belltoy belltoy force-pushed the fix/json-yaml-schemas-path branch from 8546b80 to 683fdc5 Compare February 10, 2026 03:42
@ConradIrwin
Copy link
Member

thanks! I was confused by the naming resolve_executable_path actually just resolves a path relative to the worktree. (and we can't just handle the ./ case, because we want to handle ~/ as well).

Going to hit merge on this.

@ConradIrwin ConradIrwin enabled auto-merge (squash) February 12, 2026 04:43
@ConradIrwin ConradIrwin merged commit 377407c into zed-industries:main Feb 12, 2026
27 checks passed
morgankrey added a commit that referenced this pull request Feb 19, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622

Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622
- PR #49554
- PR #49710
- PR #49716
- PR #49732
- PR #49788
- PR #49876
- PR #49902
- PR #49910
- PR #49390
- PR #50027

Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied documentation from:
- PR #48908: git diff view toggle + default setting
- PR #48909: agent mode cycling keybinding
- PR #48910: diff view nomenclature standardization
- PR #48912: split diff for everyone
- PR #48930: terminal welcome screen fix
- PR #44794: JSON/YAML schema paths
- PR #48763: Python environments in REPL
- PR #45073: zed --add terminal panels
- PR #48495: Python Windows path handling
- PR #49374: type on search default
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622
- PR #49554
- PR #49710
- PR #49716
- PR #49732
- PR #49788
- PR #49876
- PR #49902
- PR #49910
- PR #49390
- PR #50027

Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied documentation from:
- PR #48908: git diff view toggle + default setting
- PR #48909: agent mode cycling keybinding
- PR #48910: diff view nomenclature standardization
- PR #48912: split diff for everyone
- PR #48930: terminal welcome screen fix
- PR #44794: JSON/YAML schema paths
- PR #48763: Python environments in REPL
- PR #45073: zed --add terminal panels
- PR #48495: Python Windows path handling
- PR #49374: type on search default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to load relative path JSON schema for YAML validation

2 participants