TypeFox / yang-lsp

A Language Server for YANG
http://www.yang-central.org
Apache License 2.0
51 stars 13 forks source link

leafref and augment xpath serialization issue #225

Closed RimShao closed 1 year ago

RimShao commented 1 year ago

Hi

After fix #224 , it seems new problem introduced in leafref and augment xpath serialization, reproducible code and yang modules are sent by email as security reason. Thanks.

leafref before serialization:

 161         leaf zone {
 162             type leafref

163                 path "/abc:cfw/abc:zone/abc:name";

 810         leaf zone {
 811             type leafref

812                 path "/abc:cfw/abc:zone/abc:name";

leafref after serialization:

 161         leaf zone {
 162             type leafref

163                path "/abc:cfw/abc:abc:zone/abc:abc:name";

 810         leaf zone {
 811             type leafref

812                path "/abc:cfw/abc:abc:zone/abc:abc:name";

Augment before serialization:

<     augment "/abc:cfw/rule-sets/rule-set" {
<     augment "/abc:cfw/rule-sets/rule-set/rules/rule" {

<     augment "/abc:cfw/firewall/servers/server" {
<     augment "/abc:cfw/firewall/servers/server/port" {
<     augment "/abc:cfw/firewall/service-groups/service-group" {
<     augment "/abc:cfw/firewall/service-groups/service-group/member" {

Augment after serialization:

>     augment "//abc:cfw/rule-sets/rule-set" {
>     augment "//abc:cfw/firewall/servers/server" {
>     augment "//abc:cfw/rule-sets/rule-set/rules/rule" {
>     augment "//abc:cfw/firewall/servers/server/port" {
>     augment "//abc:cfw/firewall/service-groups/service-group" {
>     augment "//abc:cfw/firewall/service-groups/service-group/member" {
dhuebner commented 1 year ago

@RimShao I published a 0.7.2-SNAPSHOT build, could you please check? If the issue is fixed, we can prepare a 0.7.2 release.

dhuebner commented 1 year ago

Released with v0.7.2