Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

no error or warning using new module with old version of Ceylon #6953

Open
jvasileff opened this issue Mar 3, 2017 · 0 comments
Open

no error or warning using new module with old version of Ceylon #6953

jvasileff opened this issue Mar 3, 2017 · 0 comments

Comments

@jvasileff
Copy link
Contributor

New modules (e.g. modules compiled against 1.3.2) may use 1.3.2 features, and therefore should not be usable without some sort of error, warning, or special flag with older versions of Ceylon (e.g. 1.3.1). Or, more precisely, older versions of the language module.

A module with

module simple "1.0.0" {
    import ceylon.collection "1.3.2";
}

compiles and runs without a compatibility error using the 1.3.0 and 1.3.1 dists.

The program

import ceylon.collection {...}

shared void run() {
    print("hello");
    print(ArrayList());
}

does however fail at runtime on 1.3.0 with

jvasileff@tau:tmp.J0YFhXtJ$ swceylon 1.3.0
jvasileff@tau:tmp.J0YFhXtJ$ ceylon compile
ceylon run simNote: Created module simple/1.0.0
jvasileff@tau:tmp.J0YFhXtJ$ ceylon run simple
hello
Exception in thread "main" java.lang.LinkageError: loader constraint violation: loader (instance of ceylon/modules/jboss/runtime/CeylonModuleClassLoader) previou
sly initiated loading for a different type with name "com/redhat/ceylon/compiler/java/runtime/model/TypeDescriptor"
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:353)
        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:432)
@jvasileff jvasileff added this to the 1.3.3 milestone Mar 3, 2017
@gavinking gavinking modified the milestones: 1.3.3, 1.3.4 Aug 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants