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

feat(amx-muse): add initial schema file #4319

Merged

Conversation

damienbutt
Copy link
Contributor

Hello,

I would like to contribute this schema to the store. Hopefully everything is OK.

I followed the guidelines and ran the tests.

Thanks,
D

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@hyperupcall
Copy link
Member

Thanks! Looks good to me, but I think the fileMatch is a bit too generic to accept. I'll be able to merge this if the fileMatch is empty, or changed to something that won't potentially overlap with a different service or application

@damienbutt
Copy link
Contributor Author

damienbutt commented Dec 31, 2024

So the file name that is specified by the manufacturer (AMX) is program.json. It has to be this as once the program files are loaded onto their controller hardware, it looks for that file specifically to kick things off.

What would the consequence of making the fileMatch empty be? Isn't that property crucial to how IDE's associate schemas to files?

Is there any way to work around this?

Thanks,
D

@hyperupcall
Copy link
Member

What would the consequence of making the fileMatch empty be? Isn't that property crucial to how IDE's associate schemas to files?

Yup, the automatic schema matching would unfortunately not work. Right now, current policy is that automatic schema matching is not enabled for files with generic names because it eliminates any false positives.

Is there any way to work around this?

Currently, nope. In the future, both #3658 and #3965 (somewhat lesserso) address these issues. I'm not sure when they'll be implemented, especially since it requires coordination with several IDEs/Editors

@damienbutt
Copy link
Contributor Author

OK.

I will edit the fileMatch to be an empty string. It will just have to be a manual config in the VSCode workspace settings to associate for now.

Thanks,
D

@hyperupcall
Copy link
Member

hyperupcall commented Jan 8, 2025

Thanks for understanding! Could you set fileMatch to be an empty array as mentioned instead of an array with a single empty-string? I suspect that with some glob implementations, an empty string could match with anything, giving the opposite effect. I can't edit your branch directly because GitHub doesn't allow it

@damienbutt
Copy link
Contributor Author

Sorry, my bad. I misunderstood.

Will update now.

Thanks,
D

@hyperupcall
Copy link
Member

Awesome, thanks

@hyperupcall hyperupcall merged commit 1f0027a into SchemaStore:master Jan 9, 2025
3 checks passed
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