Closed john-h-kastner-aws closed 4 months ago
I'm looking into this and suspect it is based on extension activation events. Are you opening the schema as file and not part of a workspace?
Are you opening the schema as file and not part of a workspace?
That could be it. I can't reproduce this in a workspace, and I can't think of anything else I might have been doing. I guess I opened it in a workspace when I tried adding a *.cedar
file and came to the wrong conclusion.
Max reported a similar issue where "Open With > Visual Studio Code.app" on an individual file doesn't work as expected, even when the extension is activated. I'm looking at how to best support these related use cases as I had other logic that assumed a workspace.
Fixed some behaviors require a workspace in v0.6.0.
Note: The extension automatically activates when a Cedar language file (.cedar
) file is opened, or when any Cedar schema (JSON) file is opened as part of a workspace. Since JSON language files are so common, a design decision was to not automatically activate in this case. To trigger activation in this case, "Activate Cedar extension" was added to the Command Palette.
Category
Cedar validation features
Describe the feature you'd like to request
While looking at issue #6 I wanted to play with a schema using the plugin, but initially couldn't get the plugin to do anything with the schema. Turns out it will only process the schema if it find a
*.cedar
file also. I don't think anything it does with the schema uses the cedar policy files, so it should be easy to do all the schema processing anyways.Describe alternatives you've considered
As a workaround, creating an empty policy file gets things working, and the problem goes away entirely once you've started writing policies.
Additional context
No response
Is this something that you'd be interested in working on?