ceylon/ceylon-js

bad compilation of cross-platform modules in Eclipse

Closed this issue · 15 comments

As noticed by @lukedegruchy and discussed on gitter, modules compiled in Eclipse in multi-module projects that have native(jvm) imports fail at runtime.

The project structure is:

  • module A, which imports a JVM-only module, and uses it in file f.ceylon.
  • module B, which attempts to call a function defined in f.ceylon.

Further details on gitter.

I think "further details on Gitter" is not good enough. Any relevant information should really be gathered here.

Btw, I just pushed some fixes for dealing with multi-native projects in the IDE, could someone test with the latest code?

Seriously?

ah no, the fixes have only to do with compilation in the IDE, nothing with runtime, so my fixes won't change that.

What is the status of this issue. @quintesse I'm assigning it to you because I assume you know what it's about.

This is how the issue manifests itself:



ODE_PATH=${GITHUB_HOME}/ceylon-dist/dist/repo:{$CEYLON_HOME}/ceylon-chayote/modules:${LUKE_HOME}/.ceylon/repo:${LUKE_HOME}/.ceylon/cache:[Maven] Aether:{$CEYLON_HOME}/ceylon-chayote/modules
${GITHUB_HOME}/ceylon-dist/dist/repo/ceylon/language/1.2.0/ceylon.language-1.2.0.js:263
if (!cond)throw wrapexc(AssertionError(msg),loc,file);
          ^

Error: Assertion failed: 'exists m = modules.find(moduleNameAndVersion[0], moduleNameAndVersion[1])' at tool.ceylon (93:15-93:89)
    at AssertionError (${GITHUB_HOME}/ceylon-dist/dist/repo/ceylon/language/1.2.0/ceylon.language-1.2.0.js:3683:6)
    at Object.asrt$ (${GITHUB_HOME}/ceylon-dist/dist/repo/ceylon/language/1.2.0/ceylon.language-1.2.0.js:263:25)
    at run (${LUKE_HOME}/.ceylon/repo/com/redhat/ceylon/testjs/1.2.0/com.redhat.ceylon.testjs-1.2.0.js:175:5)
    at [eval]:1:336
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:434:26)
    at node.js:566:27
    at doNTCallback0 (node.js:407:9)
    at process._tickCallback (node.js:336:13)
ceylon test-js: Node process exited with non-zero exit code: 1

@jvasileff please check if this works now.

No, it's more broken.

Rather than getting a bad-compile, I'm getting no-js-compile for all js-enabled modules. I was thrown off in a few cases that I could run/test from within eclipse, but it turns out those were modules that I had published to ~/.ceylon/repo.

And JVM modules (those with native("jvm") module com.example.x.jvm {}) are full of backend errors like package com.example.x.base does not exist if they import and use a cross platform base module.

That last thing is an Eclipse problem that @davidfestal fixed already eclipse-archived/ceylon-ide-eclipse@0346c97

Ok, so maybe this one is fixed, but I can't test it since the js compiler isn't being run or at least isn't emitting a module.js file.

But that might be an entirely different problem. Are .js files being generated in other circumstances? Maybe there's a regression in the IDE (which might be fixed already if you haven't got the latest plugin)

I'm getting no .js files anywhere at all for any projects or modules from my build at 11:07EST (1:40 ago)

No, it's more broken.

Correction: everything seems to work perfectly for me at the time of this posting.

so I guess we can close this now @jvasileff ?

@chochos sure, it seems to work fine for me.

Confirmed.