Open lllyfeng opened 1 year ago
Do not support this change. This is not possible to implement since the deviation module is not known when the main module is parsed.
A related issue:
If the prefix is used in the importing module then the imported module MUST be found.
More Discuss: complexity: high, bc: medium, importance: low
for instance, module import-module { prefix im; //definitions leaf bar { type boolean; } }
module cur-module { prefix cur; import import-module { prefix im;
}
leaf foo { type string; when "/im:bar"; } }
module dev-module { import cur-module { prefix cur; } deviation "cur:foo" { deviate not-supported; } }
In this example, module cur-module has no leaf foo in effect, So actually, the import-module is no useful for cur-module, but cur-module MUST be provided to ensure a successful compliation. I suggest it should not be treated as error when a import module is actually no useful.