StractOrg / stract

web search done right
https://stract.com
GNU Affero General Public License v3.0
1.94k stars 43 forks source link

VS Code extension is out of step with Optic definition #142

Closed andypiper closed 4 months ago

andypiper commented 4 months ago

I'm using the Optic language server in VS Code, but I'm seeing problems listed using the sample-optics repo:

[{
    "resource": "/Users/andypiper/Development/third-party/sample-optics/academic.optic",
    "owner": "_generated_diagnostic_collection_name_#4",
    "severity": 8,
    "message": "Unexpected token \"Matches\"\nExpected one of the following tokens:\n - \"Action\"\n - \"}\"",
    "startLineNumber": 7,
    "startColumn": 5,
    "endLineNumber": 7,
    "endColumn": 12
}]

I believe this is due to changes to the way that the Optic definitions are organised now, with multiple Rule Matches being applied to a single Action.

mikkeldenker commented 4 months ago

You're completely right, I forgot to update the extension when merging https://github.com/StractOrg/stract/pull/133. It should be addressed in https://github.com/StractOrg/stract/pull/145 and released in version 0.0.12 of the extension.

Thanks for reporting this and sorry for the oversight!