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

Suggestion: add validation for missing properties under contributes in package.json for a VS Code extension #240707

Open
chrisdias opened this issue Feb 13, 2025 · 3 comments · May be fixed by #241700
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug workbench-views Workbench view issues
Milestone

Comments

@chrisdias
Copy link
Member

You can use this repo for reference: https://github.com/mohsen1/llm-debugger-vscode-extension

In package.json for this extension, the icon properties are missing for viewContainers and views that it contributes. When you run the extension, you get the following error message:

Image

I probably spent an hour trying to "fix" the top level icon property in package.json to no avail since it wasn't the culprit :). It wasn't until @isidorn pointed out to me that these contributions also needed an icon property. You can see the "fix" here:

Image

Suggestion: Can we show validation on one or more of the contributes properties in the file, similar to how there is validation on activationEvents "*" that give the user some indication of where the missing properties are?

Assigning per Isi's recommendation.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug workbench-views Workbench view issues labels Feb 17, 2025
@alexr00 alexr00 added this to the February 2025 milestone Feb 17, 2025
@alexr00
Copy link
Member

alexr00 commented Feb 17, 2025

👍 Added for your second example.

For the first example, as far as I can tell it isn't allowed to have a "debug" as a direct child of "viewsContainers". @sandy081 or @sbatten am I understanding this correctly? Should I add validation that only "activitybar" and "panel" are permitted as direct childrent of "viewsContainers"?

@sbatten
Copy link
Member

sbatten commented Feb 21, 2025

@alexr00 That's my understanding. @sandy081 could correct me if I'm wrong.

alexr00 added a commit that referenced this issue Feb 24, 2025
@alexr00 alexr00 linked a pull request Feb 24, 2025 that will close this issue
@alexr00
Copy link
Member

alexr00 commented Feb 24, 2025

@sbatten or @sandy081 , not sure who the right owner is. I made you a PR: #241700

@alexr00 alexr00 removed their assignment Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug workbench-views Workbench view issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants