exist
exist copied to clipboard
Lazy loading model for module imports
This PR fixes #1848 by allowing the user to configure which modules should be loaded lazily.
It adds a new attribute load on the module element of conf.xml. If unspecified, modules are loaded automatically (i.e. eagerly) to maintain backwards compatibility with the previous eXist-db mode of operation.
The exist-distribution config file was updated to take advantage of this new feature. Only those modules that are deemed as required by eXist-db's XQSuite tests and Apps are loaded by default. Other modules can be loaded with import module namespace, for example:
import module namespace validation = "http://exist-db.org/xquery/validation";
This open source contribution to the eXist-db project was commissioned by the Office of the Historian, U.S. Department of State, https://history.state.gov/.
Great work! Being non-native, I find the term "lazily" quite hard to remember, I think I see "lazy" more often, is shorter and IMO more clear whilst still correct?
Great work! @adamretter are we completely sure that the code is backwards compatible? This line might show something different? (not sure)
is this PR a v7 candidate ? will old code still work?
Great work! Being non-native, I find the term "lazily" quite hard to remember, I think I see "lazy" more often, is shorter and IMO more clear whilst still correct?
@dizzzz "lazily" is the adverb (modifies a verb), whilst "lazy" is the adjective (describes a state).
In this instance load="lazily" - so the verb is "load", and the adverb ("lazily") modifies that.
I think it makes sense, although for sure my English is not perfect either!
We can change it if you still want us to? Perhaps @joewiz has an opinion on this?
I see benefits in standardizing on "lazy". Now the code has instances of both "lazy" and "lazily" (but only "eager" - not "eagerly" - instead "always"). Standardizing on just "lazy" and "eager" (and doing away with "lazily" and "always") would probably prevent people mixing up the different verb forms/words on their code/configurations.
Standardizing on just "lazy" and "eager"
@joewiz We have now switched this to lazy and eager
This change is a clear hint that this constitutes a breaking change.
@line-o Sure, the target for this is eXist-db 7.0.0.
Tests are failing








