Importing from a namespace that is not scoped imports into global scope
This is semantically not an error, but causes huge performance problems. If such an import is added or removed it causes all tasks that (transitively) depend on the root URI to be re-evaluated.
A simple fix is to dynamically check it and produce warning messages. If we want to produce a warning in the NaBL specification we need some kind of data flow analysis of NaBL because the scopes clause does not have to be on the pattern that has the import clause, it can also be on an descendent pattern.
Submitted by Gabriël Konat on 16 June 2013 at 16:23
Issue Log
Is this an error or a need for static analysis of NaBL itself? Should be a feature or improvement?
Like the issue states, it is not an error. Static analysis would be nice, but not sure if it is possible. Detecting this at runtime and showing a message in the console is the easiest ‘fix’.
Ok, I removed the error tag. Static analysis needs knowledge of the grammar to figure out if something is not scoped.
Log in to post comments