These are chat archives for ceylon/ceylon-ide-eclipse

28th
Feb 2017
Gavin King
@gavinking
Feb 28 2017 09:57
@davidfestal the build of the Eclipse plugin seems to be broken
Bastien Jansen
@bjansen
Feb 28 2017 09:59
err that stupid Jenkins hasn't built ceylon-ide-common for 28 days :(
Bastien Jansen
@bjansen
Feb 28 2017 14:07
I'm working on the build problem, it looks like something changed in the dist that breaks how modules are queried when the module version is surrounded with quotes
Bastien Jansen
@bjansen
Feb 28 2017 14:22
@FroMage the error was introduced in ceylon/ceylon@e1bcdf0
according to git bisect
Stéphane Épardaud
@FroMage
Feb 28 2017 14:25
damnit
for which module?
do you know?
Bastien Jansen
@bjansen
Feb 28 2017 14:26
wdym?
Stéphane Épardaud
@FroMage
Feb 28 2017 14:26
well, which module does it cause issues for?
Bastien Jansen
@bjansen
Feb 28 2017 14:26
it looks like versions were always quoted in the generated MANIFEST.MF
the Eclipse plugin
source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'ceylon.language-"1.3.2.osgi-4"(.car|.jar)'
    shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
    ^
      - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'ceylon.language/"1.3.2.osgi-4"'
source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.langtools.classfile-"1.3.2.osgi-4"(.car|.jar)'
    shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
    ^
      - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.langtools.classfile/"1.3.2.osgi-4"'
source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'ceylon.bootstrap-"1.3.2.osgi-4"(.car|.jar)'
    shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
    ^
      - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'ceylon.bootstrap/"1.3.2.osgi-4"'
source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.model-"1.3.2.osgi-4"(.car|.jar)'
    shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
    ^
      - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.model/"1.3.2.osgi-4"'
source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.module-resolver-"1.3.2.osgi-4"(.car|.jar)'
    shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
    ^
      - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.module-resolver/"1.3.2.osgi-4"'
source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.common-"1.3.2.osgi-4"(.car|.jar)'
    shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
    ^
      - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.common/"1.3.2.osgi-4"'
Note: Created module com.redhat.ceylon.eclipse/1.3.2
ceylon compile: There were 6 errors
Gavin King
@gavinking
Feb 28 2017 14:27
why would one quote versions in a MANIFEST?
Stéphane Épardaud
@FroMage
Feb 28 2017 14:27
this is something that kicks in for modules with a module.xml, and it adds their group/artifact id if there's a pom.xml in there
it doesn't do anything with quotes or version
Bastien Jansen
@bjansen
Feb 28 2017 14:27
modules that import com.redhat.ceylon.dist "1.3.2-SNAPSHOT" fail
Stéphane Épardaud
@FroMage
Feb 28 2017 14:28
oh, dist
that's one odd beast
Bastien Jansen
@bjansen
Feb 28 2017 14:28
@gavinking it's allowed because sometimes it's a range like bundle-version="[1.0,1.1)"
well not in that particular case, but quotes are valid
Stéphane Épardaud
@FroMage
Feb 28 2017 14:28
but still I don't know why that would change anything wrt versions
my code really only sets the artifact/group
Bastien Jansen
@bjansen
Feb 28 2017 14:28
@FroMage I think I know a workaround, but that still doesn't explain why it's now failing
we have this code that replaces a range with a single version and removes quotes at the same time:
        requireBundle = requireBundle.replaceAll(";bundle-version=\"\\[([^,]+),[^,]+(\\]|\\))\"", ";bundle-version=$1");
we could do something similar right after to remove quotes that are still present
in com.redhat.ceylon.cmr.impl.OSGiDependencyResolver#parseRequireBundle
Stéphane Épardaud
@FroMage
Feb 28 2017 14:31
so the one thing I wonder is why we're even hitting this resolver
oh ok it's a jar with Activator and that's it
and indeed an OSGi decl
I was thinking I could add the same augment to that resolver to set group/artifact but it doesn't have one so it wouldn't help
but yeah, parseAttribute looks bogus to me
it should deal with optional quotes
not that horrible regex
Bastien Jansen
@bjansen
Feb 28 2017 14:35
maybe we're doing it wrong and we shouldn't put those quotes in the first place
Stéphane Épardaud
@FroMage
Feb 28 2017 14:37
isn't this a brilliant website? https://www.osgi.org/bundle-headers-reference/
no links to the definitions
Bastien Jansen
@bjansen
Feb 28 2017 14:40
yeah I have the last one open too
so I'll try to add remove the quotes in parseRequireBundle and see if it works better
Stéphane Épardaud
@FroMage
Feb 28 2017 14:42
thanks
Bastien Jansen
@bjansen
Feb 28 2017 15:12
hum, even without the quotes I can't build the plugin
     [exec] /Users/bastien/Dev/ceylon/ceylon-ide-eclipse/plugins/com.redhat.ceylon.eclipse.ui/source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'ceylon.language-1.3.2.osgi-4(.car|.jar)'
     [exec]     shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
     [exec]     ^
     [exec]       - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'ceylon.language/1.3.2.osgi-4'
     [exec] /Users/bastien/Dev/ceylon/ceylon-ide-eclipse/plugins/com.redhat.ceylon.eclipse.ui/source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.model-1.3.2.osgi-4(.car|.jar)'
     [exec]     shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
     [exec]     ^
     [exec]       - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.model/1.3.2.osgi-4'
     [exec] /Users/bastien/Dev/ceylon/ceylon-ide-eclipse/plugins/com.redhat.ceylon.eclipse.ui/source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'ceylon.bootstrap-1.3.2.osgi-4(.car|.jar)'
     [exec]     shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
     [exec]     ^
     [exec]       - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'ceylon.bootstrap/1.3.2.osgi-4'
     [exec] /Users/bastien/Dev/ceylon/ceylon-ide-eclipse/plugins/com.redhat.ceylon.eclipse.ui/source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.module-resolver-1.3.2.osgi-4(.car|.jar)'
     [exec]     shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
     [exec]     ^
     [exec]       - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.module-resolver/1.3.2.osgi-4'
     [exec] /Users/bastien/Dev/ceylon/ceylon-ide-eclipse/plugins/com.redhat.ceylon.eclipse.ui/source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.common-1.3.2.osgi-4(.car|.jar)'
     [exec]     shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
     [exec]     ^
     [exec]       - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.common/1.3.2.osgi-4'
     [exec] /Users/bastien/Dev/ceylon/ceylon-ide-eclipse/plugins/com.redhat.ceylon.eclipse.ui/source/com/redhat/ceylon/eclipse/module.ceylon:20: error: cannot find module artifact 'com.redhat.ceylon.langtools.classfile-1.3.2.osgi-4(.car|.jar)'
     [exec]     shared import com.redhat.ceylon.dist "1.3.2-SNAPSHOT";
     [exec]     ^
     [exec]       - dependency tree: 'com.redhat.ceylon.eclipse/1.3.2' -> 'com.redhat.ceylon.dist/1.3.2-SNAPSHOT' -> 'com.redhat.ceylon.langtools.classfile/1.3.2.osgi-4'
     [exec] ceylon compile: There were 6 errors
Bastien Jansen
@bjansen
Feb 28 2017 15:49
all right, it looks like com.redhat.ceylon.dist-1.3.2-SNAPSHOT.jar does contain any META-INF/maven/pom.xml, which means com.redhat.ceylon.cmr.impl.ModulesDependencyResolver#augment will return null instead of the ModuleInfo it received as a parameter
couldn't that method return ret instead of null @FroMage ?
that module info exists, it's just that we can't augment it with a groupId/artifactId
with that single change, I don't need to remove the quotes around the OSGi version, and the Eclipse plugin build fine again
Stéphane Épardaud
@FroMage
Feb 28 2017 17:31
WAT
what an idiot
of course that method should not return null
maaaan
I'm so sorry this is really crap
just pushed the fix
Bastien Jansen
@bjansen
Feb 28 2017 17:33
heh
thanks