Can't detect when already-imported module is wrong version
Bug #867050 reported by
Chris Hillery
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
New
|
Medium
|
Chris Hillery |
Bug Description
In translator, mod_sctx_map is used to map all location URIs to a static_context loaded from that URI. However, the static_context in there apparently has only the function and variable declarations from the module. In particular, it does not have any "declare option" values.
The problem with this is that if I'm processing an "import module" and I come across a URI that I've already loaded, there is no way to know what version was loaded. Therefore I cannot check whether the already-loaded module meets the version specification of the import statement.
tags: | removed: v2.1 |
To post a comment you must log in.
Two solutions:
1. Ensure that the static_contexts in mod_sctx_map DO have "declare option" declarations (and ensure that those declarations don't then get exported from there into the static_context of any importing modules)
2. Switch to using the "decorated" URI (including a version fragment) as the key to mod_sctx_map. This (along with some other changes) would also solve several outstanding problems with importing multiple versions of the same module. However, it has issues of its own...