Opened 11 years ago

Closed 11 years ago

#2422 closed defect (fixed)

loadFile("path/to/library/package.mo") loads the wrong library

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description

We have:
loadFile("../C2M2L_Ext/package.mo");

The directory contains:

C2M2L_Ext
C2M2L_Ext 1.5.2459
C2M2L_Ext 1.6.2479

So which one is loaded?
It seems C2M2L_Ext 1.6.2479 which is rather wrong!

Change History (3)

comment:1 by Adrian Pop, 11 years ago

Owner: changed from somebody to Adrian Pop
Status: newaccepted

comment:2 by Adrian Pop, 11 years ago

Is pretty clear why it happens.
We transform:
loadFile("../C2M2L_Ext/package.mo");
into
loadModel(C2M2L_Ext, {"default"});
which loads the library with biggest version number:
"" < "1.5.2459" < "1.6.2479"
so the winner is ...
C2M2L_Ext 1.6.2479/pacakge.mo.

However I'll change this so we send the actual
priority "" not "default" in ClassLoader.loadFile
as in this case we really want to load a specific
version.

comment:3 by Adrian Pop, 11 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in r17713.

Note: See TracTickets for help on using tickets.