Tracking issue for type kind representations
- Dominant language
- Go
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Current status of each type and representation
| type & representation | status |
|-------------------------------------------|------------------|
| map {} representation map | Parse error [1] |
| map {} representation stringpairs | Parse error [1] |
| map {} representation listpairs | Parse error [1] |
| struct {} representation map (rename) | OK |
| struct {} representation tuple | OK |
| struct {} representation stringpairs | Not Impl [2] |
| struct {} representation stringjoin | OK |
| struct {} representation listpairs | Not Impl [2] |
| union {} representation keyed | OK |
| union {} representation kinded | OK |
| union {} representation envelope | Not Impl [3] |
| union {} representation inline | Not Impl [3] |
| union {} representation stringprefix | OK |
| union {} representation bytesprefix | Not Impl [3] |
| enum {} representation string | OK |
| enum {} representation int | Bug [4] |
Similar charts here:
https://github.com/ipld/go-ipld-prime/blob/8ad3e7722935154f6fbe09fd495fdafb62af8180/schema/gen/go/README.md
----
### Causes for errors
[1] noname:2:14: unexpected token: "representation"
https://github.com/ipld/go-ipld-prime/blob/master/schema/dsl/parse.go#L561
parser.typeMap doesn't parse the representation. Should be doing:
```
if tok, err := p.peekToken(); err == nil && tok == "representation" {
...
```
[2] noname:5:8: unknown struct repr: "stringpairs"
noname:5:8: unknown struct repr: "listpairs"
https://github.com/ipld/go-ipld-prime/blob/0c00a9390092edcabe37853a19ca9e800633da70/schema/dsl/parse.go#L471
[3] noname:5:8: TODO: union repr "envelope"
noname:5:8: TODO: union repr "inline"
noname:5:8: TODO: union repr "bytesprefix"
https://github.com/ipld/go-ipld-prime/blob/0c00a9390092edcabe37853a19ca9e800633da70/schema/dsl/parse.go#L646
[4] Is parsed and constructed, but t.RepresentationBehavior() == "string" even for "representation int"
root cause unknown
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.