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

Invalid JSON escaping in cargo-util-schemas #14999

Closed
fruzitent opened this issue Jan 1, 2025 · 0 comments · Fixed by #15000
Closed

Invalid JSON escaping in cargo-util-schemas #14999

fruzitent opened this issue Jan 1, 2025 · 0 comments · Fixed by #15000
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@fruzitent
Copy link

Problem

#14683 introduces generation of schema for Cargo.toml. However, it's not a valid JSON.

Steps

$ cat manifest.schema.json | jq
jq: parse error: Invalid numeric literal at line 989, column 105

Possible Solution(s)

diff --git a/manifest.schema.json b/manifest.schema.json.1
index a7ea5bd..020be02 100644
--- a/manifest.schema.json
+++ b/manifest.schema.json.1
@@ -986,11 +986,11 @@
     "TomlDependency_for_String": {
       "anyOf": [
         {
-          "description": "In the simple format, only a version is specified, eg. `package = /"<version>/"`",
+          "description": "In the simple format, only a version is specified, eg. `package = \"<version>\"`",
           "type": "string"
         },
         {
-          "description": "The simple format is equivalent to a detailed dependency specifying only a version, eg. `package = { version = /"<version>/" }`",
+          "description": "The simple format is equivalent to a detailed dependency specifying only a version, eg. `package = { version = \"<version>\" }`",
           "allOf": [
             {
               "$ref": "#/definitions/TomlDetailedDependency_for_String"

Notes

No response

Version


@fruzitent fruzitent added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jan 1, 2025
epage added a commit to epage/cargo that referenced this issue Jan 1, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 1, 2025
### What does this PR try to resolve?

Fixes #14999

### How should we test and review this PR?

### Additional information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant