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

Errors happens when compiling example asn files #3

Open
herugen opened this issue Apr 20, 2021 · 1 comment
Open

Errors happens when compiling example asn files #3

herugen opened this issue Apr 20, 2021 · 1 comment

Comments

@herugen
Copy link

herugen commented Apr 20, 2021

Hi, there's errors happens when running with the example asn files in the repo, seems missing support of CHOICE type

$asn1go  rfc1155.asn1
Errors generating Go AST from module: 
  Ignoring unsupported type asn1go.ObjectIdentifierType{}
  Ignoring unsupported type asn1go.ChoiceType{AlternativeTypeList:[]asn1go.NamedType{asn1go.NamedType{Identifier:"simple", Type:"SimpleSyntax"}, asn1go.NamedType{Identifier:"application-wide", Type:"ApplicationSyntax"}}, ExtensionTypes:[]asn1go.ChoiceExtension(nil)}
  Ignoring unsupported type asn1go.ChoiceType{AlternativeTypeList:[]asn1go.NamedType{asn1go.NamedType{Identifier:"number", Type:asn1go.IntegerType{NamedNumberList:map[string]int(nil)}}, asn1go.NamedType{Identifier:"string", Type:asn1go.OctetStringType{}}, asn1go.NamedType{Identifier:"object", Type:asn1go.ObjectIdentifierType{}}, asn1go.NamedType{Identifier:"empty", Type:asn1go.NullType{}}}, ExtensionTypes:[]asn1go.ChoiceExtension(nil)}
  Ignoring unsupported type asn1go.ChoiceType{AlternativeTypeList:[]asn1go.NamedType{asn1go.NamedType{Identifier:"address", Type:"NetworkAddress"}, asn1go.NamedType{Identifier:"counter", Type:"Counter"}, asn1go.NamedType{Identifier:"gauge", Type:"Gauge"}, asn1go.NamedType{Identifier:"ticks", Type:"TimeTicks"}, asn1go.NamedType{Identifier:"arbitrary", Type:"Opaque"}}, ExtensionTypes:[]asn1go.ChoiceExtension(nil)}
  Ignoring unsupported type asn1go.ChoiceType{AlternativeTypeList:[]asn1go.NamedType{asn1go.NamedType{Identifier:"internet", Type:"IpAddress"}}, ExtensionTypes:[]asn1go.ChoiceExtension(nil)}
@chemikadze
Copy link
Owner

Not all types are supported, current impl is quite incomplete (this is somewhat experimental / playground project for me). I've added experimental support for CHOICE recently and some other types, rfc1155 should generate alright now.

I've sprinkled some skips in tests so it's more clear what does not work and why: https://github.com/chemikadze/asn1go/blob/master/examples/examples_test.go#L45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants