opa
opa copied to clipboard
AST: Inconsistent casing of location in serialized comment nodes
When serialized, comment nodes display the location and text attributes as Location and Text. This is inconsistent with how those attributes are presented anywhere else in the AST (where they are lowercased), and it would be good to have that fixed.
package p
# foo bar
opa parse --format json p.rego
{
"package": {
"path": [
{
"type": "var",
"value": "data"
},
{
"type": "string",
"value": "p"
}
]
},
"comments": [
{
"Text": "IGZvbyBiYXI=",
"Location": {
"file": "c.rego",
"row": 3,
"col": 1
}
}
]
}
Hello @anderseknert . I would like to contribute to this bug, can you please assigned this issue to me?
Hi @prashant3286! And thank you for offering to help! The issues that are tagged 1.0 are a little special compared to other issues, as they are breaking changes that can't be included in our monthly releases. That means special care will need to be taken either to guard these features behind feature flags, or simply delay them until the 1.0 release. In this case, I'm not sure it'd be feasible to change serialization format based on a feature flag, so I'll defer this to @johanfylling and @ashutosh-narkar, who are leading the 1.0 effort.
Sure. Please let me know if the breaking changes will be implemented soon so that I could contribute to the other issue. Also please suggest me some bug which needs to be fixed asap.
Starting out with one of the issues marked as "good first issue" is a good way to get your feet wet before going after bigger fish :)
Not much point in keeping this open since it isn't included for 1.0. Closing.