You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the following error when referencing a typedef in a submodule where another submodule under the same parent module is explicitly included.
application/application/system/level - typedef log-level not found
When the submodule is not explicitly included, there's no error. Using a prefix makes no difference. I tried to print out which 'node's (not sure what the right terminology is) are crawled to find the typedef in findTypedef in freeconf/yang/meta/compile.go, I see different nodes are traversed with and without the include:
// with "include some-types;"
>> rm -f testfreeconf && go build && ./testfreeconf
searching ident: level // just fmt.Printf("searching ident: %v\n", p.Ident())
searching ident: log-params
searching ident: system
panic: application/application/system/level - typedef log-level not found
goroutine 1 [running]:
main.main()
/n/dev/scratch/freeconf/main.go:26 +0x8d
// without "include some-types;"
>> rm -f testfreeconf && go build && ./testfreeconf
searching ident: level
searching ident: log-params
searching ident: application
In RFC 7590 the include is optional, but I believe its mandatory in 6020. From section 5.1:
o For a submodule to reference definitions in a second submodule of
the same module, the first submodule MUST include the second
submodule.
I see the following error when referencing a typedef in a submodule where another submodule under the same parent module is explicitly included.
When the submodule is not explicitly included, there's no error. Using a prefix makes no difference. I tried to print out which 'node's (not sure what the right terminology is) are crawled to find the typedef in
findTypedef
infreeconf/yang/meta/compile.go
, I see different nodes are traversed with and without the include:In RFC 7590 the include is optional, but I believe its mandatory in 6020. From section 5.1:
Yang files:
Attempt to load the modules
The text was updated successfully, but these errors were encountered: