Skip to content
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

FIXED: Unable to resolve cmake-tools-schema:/schemas... #3108

Closed
aremmell opened this issue Apr 12, 2023 · 3 comments · Fixed by #3139
Closed

FIXED: Unable to resolve cmake-tools-schema:/schemas... #3108

aremmell opened this issue Apr 12, 2023 · 3 comments · Fixed by #3139
Labels
bug a bug in the product
Milestone

Comments

@aremmell
Copy link

I have reproduced this, and through sheer stubbornness, finally figured it out.

You're passing the location for the schema JSON files to vscode.Url.file, which VS Code internally translates as a path on disk. And it's the wrong path.

Unfortunately, sometimes a path like, folder/and/another1 doesn't always mean "relative to my current working directory–but ./folder/and/another1 does.

I found the rogue path construction code in dist/main.js (around line 50080), and as you can see by the attached screenshot, all I've done is add ./ in front of the paths, and everything's working fine now.

You do also need to empty `CMakePresets.json, and then invoke the "Delete Cache" / "Reset Extension State" actions from the command palette. Then quit VS code, restart it, and it should be gtg.

I am not 100% sure this applies to locales that exist and have a separate path constructed, so you'll want to check that too.

Please re-open and fix this one! It's difficult to navigate the JSON without a schema to help you along.

Thanks for listening, and thanks for the cool extension.

Screenshot 2023-04-12 at 04 55 28

@gcampbell-msft
Copy link
Collaborator

@aremmell I agree that this is not ideal, marking this as a bug and we will add it to our backlog! Thanks for posting the issue.

@gcampbell-msft gcampbell-msft added the bug a bug in the product label Apr 12, 2023
@gcampbell-msft gcampbell-msft modified the milestones: On Deck, 1.15 Apr 12, 2023
@xisui-MSFT
Copy link
Collaborator

@gcampbell-msft This is affecting us too. Looks like can be fixed easily though, can you help?

@bobbrow
Copy link
Member

bobbrow commented Apr 25, 2023

I am prepping a PR for it. Duplicate of #2587. Thank you for locating the problem @aremmell!

@bobbrow bobbrow linked a pull request Apr 25, 2023 that will close this issue
@microsoft microsoft deleted a comment from xisui-MSFT Apr 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants