ceylon-web-ide-backend icon indicating copy to clipboard operation
ceylon-web-ide-backend copied to clipboard

Shared imports throws exception

Open xkr47 opened this issue 9 years ago • 3 comments

  1. Start from e.g. Hello World app in the Web IDE
  2. Enable "Advanced" mode
  3. Enter the following in the modules.ceylon file:
shared import ceylon.collection "1.2.0";

.. and then hit "Run".

Expected: "Hello world!" Actual:

error   undefined    —    Translated code could not be parsed:
error   undefined    —    --- TypeError: dep.indexOf is not a function

If I remove shared from the import declaration, no errors occur.

xkr47 avatar Jan 08 '16 14:01 xkr47

Weird that it only happens in the Web IE, any ideas @chochos ?

quintesse avatar Jan 08 '16 14:01 quintesse

As a side effect also the "Run" button becomes permanently disabled, but you can save the project & reload the page to recover.

xkr47 avatar Jan 08 '16 14:01 xkr47

Off the top of my head, this could be because the generated code is not wrapped in a CommonJS module...

chochos avatar Jan 11 '16 17:01 chochos