Nick Wellnhofer wrote on 12/14/15, 5:37 AM:
Regarding the Perl modules: When we make new Clownfish and Lucy releases that
are incompatible with the 0.4 branch, we'll run into a serious problem. If a
Lucy 0.4 user installs Clownfish 0.5, Lucy will stop working in a rather
unpredictable way. I guess that Lucy simply won't load because of symbols
removed from Clownfish.so, so at least there's no danger of data corruption. The
error message will be rather cryptic, though.
Perl doesn't allow to install multiple versions of a module, so an obvious
solution is to use a separate namespace for different major versions like
Lucy::0.4, Clownfish::0.5.
Marvin is having flashbacks, I'm sure. ;)
I believe that what has been done in the last is to namespace the *old* version
with some version-specific name. That said...
We could also keep using the same namespace and die with a meaningful error
message if an incompatible version of a prerequisite is detected. I envision
something like the "compatibility version" in Darwin dynamic libraries. The
compatibility version is the lowest version a parcel is compatible with,
typically the first release of a major version. For example, Clownfish.cfp would
contain:
version: "v0.5.2",
compatibilityVersion: "v0.5.0",
I like that idea. It dis-entangles the name from the version, which can be nice
when, e.g., we have a 0.x release that is ABI compatible with version 0.x-1.
Then any parcel requiring Clownfish can check whether `compatibilityVersion` is
lower to or equal than the required version (in addition to the check whether
`version` is higher than or equal to the required version). In other words, a
prerequisite can only be used for parcels requiring a version between
`compatibilityVersion` and `version` inclusive. The Perl implementation is a bit
tricky because the check must be done before Clownfish.xs is bootstrapped.
Unfortunately, we'd need this feature to be present in the Lucy 0.4 branch to
make this work. Maybe we should make a new 0.4 release first?
If we got consensus about a versioning scheme, I'm +1 for another 0.4 release to
prep it.
--
Peter Karman . http://peknet.com/ . [email protected]