-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-Starlark-InterpreterIssues involving the Starlark interpreter used by BazelIssues involving the Starlark interpreter used by Bazeltype: bug
Description
Description of the bug:
A couple of packages are published to npm with a JSON descriptor which is valid in every context it's used.
However json.decode
fails on this part of the file:
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
More context here:
aspect-build/rules_js#148
I agree with the library author that it's really a Bazel bug, which should follow the https://en.wikipedia.org/wiki/Robustness_principle of "be permissive in what you accept". Author points this out:
wooorm/decode-named-character-reference#2
wooorm/stringify-entities#11
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
json.decode("""
{
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}
""")
What is the output of bazel info release
?
5.x
codersasha and z8v
Metadata
Metadata
Assignees
Labels
P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-Starlark-InterpreterIssues involving the Starlark interpreter used by BazelIssues involving the Starlark interpreter used by Bazeltype: bug