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

Possible error in version.schema.json? #230

Closed
flcdrg opened this issue Oct 11, 2018 · 2 comments
Closed

Possible error in version.schema.json? #230

flcdrg opened this issue Oct 11, 2018 · 2 comments
Labels

Comments

@flcdrg
Copy link
Contributor

flcdrg commented Oct 11, 2018

I created a new version.json file (following the instructions in https://github.com/AArnott/Nerdbank.GitVersioning/blob/master/doc/versionJson.md ).

Editing this file in VSCode, the following error is logged, which I take to mean that there's an issue in the regex?

[Error - 9:48:26 AM] Error while validating file:///c%3A/dev/git/MyProject/version.json: Invalid regular expression: /^v?(?<major>0|[1-9][0-9]*)\.(?<minor>0|[1-9][0-9]*)(?:\.(?<patch>0|[1-9][0-9]*)(?:\.(?<revision>0|[1-9][0-9]*))?)?(?<prerelease>-(?:[\da-z\-]+|\{height\})(?:\.(?:[\da-z\-]+|\{height\}))*)?(?<buildMetadata>\+(?:[\da-z\-]+|\{height\})(?:\.(?:[\da-z\-]+|\{height\}))*)?$/: Invalid group
SyntaxError: Invalid regular expression: /^v?(?<major>0|[1-9][0-9]*)\.(?<minor>0|[1-9][0-9]*)(?:\.(?<patch>0|[1-9][0-9]*)(?:\.(?<revision>0|[1-9][0-9]*))?)?(?<prerelease>-(?:[\da-z\-]+|\{height\})(?:\.(?:[\da-z\-]+|\{height\}))*)?(?<buildMetadata>\+(?:[\da-z\-]+|\{height\})(?:\.(?:[\da-z\-]+|\{height\}))*)?$/: Invalid group
    at new RegExp (<anonymous>)
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:37705
    at z (c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:38951)
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:33084
    at z (c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:35308)
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:40896
    at z (c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:43497)
    at g (c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:41344)
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:42242
    at z (c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain.js:9:43497)
@AArnott
Copy link
Collaborator

AArnott commented Oct 12, 2018

I'm not seeing this error when I try in VS Code. And when I copy and paste the regex shown in my schema file, or the one in your error message (which are equivalent, modulo the JSON escaping of backslashes) into https://regex101.com/ in Javascript mode, no errors are reported. Can you file a bug against VS Code (and link it here)? Thanks.

@flcdrg
Copy link
Contributor Author

flcdrg commented Oct 12, 2018

Can do..

AArnott added a commit that referenced this issue Oct 15, 2018
Some flavors of JS don't support these, and we don't need them.

Fixes #230
AArnott added a commit that referenced this issue Nov 15, 2023
Bump to the .NET 8.0.100 SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants