Can't detect when already-imported module is wrong version

Bug #867050 reported by Chris Hillery
6
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.

Revision history for this message
Chris Hillery (ceejatec) wrote :

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...

Revision history for this message
Chris Hillery (ceejatec) wrote :

Based on discussion last week, option (2) was rejected. It was decided that for 2.0 we would not support importing multiple versions of a module. Therefore, fixing this bug is a "nice-to-have" for 2.0.

tags: removed: v2.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.