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

6th
Jun 2016
Gavin King
@gavinking
Jun 06 2016 19:59
I can’t compiler the IDE
compile-source:
[ceylon-compile] /Users/gavin/ceylon-ide-common/source/com/redhat/ceylon/ide/common/model/IdeModule.ceylon:1014: error: formal member 'namespace' of 'ArtifactResult' not implemented in class hierarchy
[ceylon-compile]                 loadPackageList(object satisfies ArtifactResult {
[ceylon-compile]                                 ^
[ceylon-compile] /Users/gavin/ceylon-ide-common/source/com/redhat/ceylon/ide/common/model/IdeModuleManager.ceylon:120: error: class cannot be instantiated: 'ModuleImport' does not have a default constructor
[ceylon-compile]             defaultModule.addImport(ModuleImport(languageModule, false, false));
[ceylon-compile]                                     ^
[ceylon-compile] /Users/gavin/ceylon-ide-common/source/com/redhat/ceylon/ide/common/model/IdeModuleManager.ceylon:120: error: ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'ModuleImport' that accepts the given argument types 'Module, Boolean, Boolean'
[ceylon-compile]             defaultModule.addImport(ModuleImport(languageModule, false, false));
[ceylon-compile]                                     ^
@davidfestal
@quintesse @chochos did one of you guys break the IDE?
David Festal
@davidfestal
Jun 06 2016 20:03
I just had the same, after pulling everything in order to push my changes.
I'll have a look
yes, it's related to the changes made to support namespaces
Gavin King
@gavinking
Jun 06 2016 20:06
thanks
Enrique Zamudio
@chochos
Jun 06 2016 20:17
wasn't me
sounds like you need to update cmr
ArtifactResult.namespace is something @quintesse added recently
David Festal
@davidfestal
Jun 06 2016 20:22
I modified ceylon-ide-common to make it compile again
I'm about to push
Gavin King
@gavinking
Jun 06 2016 20:42
@davidfestal thanks
David Festal
@davidfestal
Jun 06 2016 21:09
I pushed, but you will have to also pull the dist, since I had pending changes to the dist also
Tako Schotanus
@quintesse
Jun 06 2016 21:21
Yes sorry that was me, I had forgotten to push the (tiny) IDE changes I made
I pushed my fix to ide-common, ide-eclipse was already fixed (by David I assume)
Gavin King
@gavinking
Jun 06 2016 21:23
ok, thanks, trying now
Tako Schotanus
@quintesse
Jun 06 2016 21:23
I did not fix IntelliJ btw (not sure it needs fixing)
Gavin King
@gavinking
Jun 06 2016 21:24
i will try it too
Gavin King
@gavinking
Jun 06 2016 21:30
I still have errors:
[ceylon-compile] /Users/gavin/ceylon-ide-common/source/com/redhat/ceylon/ide/common/model/IdeModule.ceylon:1018: error: overloaded member does not exactly refine an inherited overloaded member: 'namespace' in 'anonymous#11'
[ceylon-compile]                     shared actual String? namespace() => null;
[ceylon-compile]                                           ^
[ceylon-compile] /Users/gavin/ceylon-ide-common/source/com/redhat/ceylon/ide/common/model/IdeModule.ceylon:1026: error: overloaded member does not exactly refine an inherited overloaded member: 'namespace' in 'anonymous#11'
[ceylon-compile]                     shared actual String? namespace() => null;
[ceylon-compile]                                           ^
is that a merge error?
looks like it
Tako Schotanus
@quintesse
Jun 06 2016 21:32
Yes, I guess so, I see now in the log that David fixed this already
Just in a different way that didn't cause merge errors
David Festal
@davidfestal
Jun 06 2016 21:32
@quintesse you also pushed some changes ?
I was able to build the Eclipse IDE correctly here
Tako Schotanus
@quintesse
Jun 06 2016 21:34
Yeah sorry, it merged cleanly so I didn't look any further
David Festal
@davidfestal
Jun 06 2016 21:34
Ah, OK
Tako Schotanus
@quintesse
Jun 06 2016 21:34
It should work now
David Festal
@davidfestal
Jun 06 2016 21:44
so now after reinstalling into my main Eclipe
the Ceylon IDE build doesn't work anymore
no idea where it comes from
:-(
Gavin King
@gavinking
Jun 06 2016 22:11
Well, yes, IntelliJ needs fixing too:
   [javac2] /Users/gavin/ceylon-ide-intellij/src/org/intellij/plugins/ceylon/ide/startup/CeylonIdeMetamodelEnricher.java:118: error: <anonymous org.intellij.plugins.ceylon.ide.startup.CeylonIdeMetamodelEnricher$1> is not abstract and does not override abstract method namespace() in ArtifactResult
   [javac2]                 ArtifactResult artifactResult = new ArtifactResult() {
   [javac2]                                                                      ^
David Festal
@davidfestal
Jun 06 2016 22:12
yes. By the way, did you reinstall the Eclipse plugin in your main Eclipse after pulling everything and rebuilding ?
Gavin King
@gavinking
Jun 06 2016 22:13
doing it now
David Festal
@davidfestal
Jun 06 2016 22:13
because I have strange errors related to package descriptors so that no project builds correctly
I'm currently looking into it, and testing a fix
even though I still don't where it came from
@quintesse : did you change the way module /package descriptor annotations are generated ?
Gavin King
@gavinking
Jun 06 2016 22:27
I get
Errors occurred during the build.
Errors running builder 'Ceylon Builder' on project 'com.redhat.ceylon.eclipse.ui'.
com.redhat.ceylon.ide.common.model.UnknownTypeMirror cannot be cast to java.lang.String
Errors running builder 'Ceylon Builder' on project 'nodetest'.
com.redhat.ceylon.ide.common.model.UnknownTypeMirror cannot be cast to java.lang.String
David Festal
@davidfestal
Jun 06 2016 22:28
Yes, these are the errors I had also
it seems something is broken in the way annotations are read from module / package descriptors
David Festal
@davidfestal
Jun 06 2016 22:45
according to this:
    @Override
    public void addImplicitImports() {
        Module languageModule = modules.getLanguageModule();
        for(Module m : modules.getListOfModules()){
            // Java modules don't depend on ceylon.language
            if((m instanceof LazyModule == false || !((LazyModule)m).isJava()) && !m.equals(languageModule)) {
                // add ceylon.language if required
                ModuleImport moduleImport = findImport(m, languageModule);
                if (moduleImport == null) {
                    moduleImport = new ModuleImport(null, languageModule, false, true);
                    m.addImport(moduleImport);
                }
            }
        }
    }
from LazyModuleManager it seems that we can (should?) add null as the namespace for a Ceylon module
David Festal
@davidfestal
Jun 06 2016 23:19
I found the root cause
Gavin King
@gavinking
Jun 06 2016 23:19
good
David Festal
@davidfestal
Jun 06 2016 23:19
when using new ArtifactContext() with 3 parameters
these params are not anymore the name, version and suffix
they have become the namespace, name and version
so in the classpath containers
when we look for the artifact of the language module
we search for a name 1.2.3 and a version .CAR !
Gavin King
@gavinking
Jun 06 2016 23:21
perfect
David Festal
@davidfestal
Jun 06 2016 23:21
I'm changing in all the places where the ArtifactContext is used in the IDE and common code
and will rebuild then
Gavin King
@gavinking
Jun 06 2016 23:22
ok
David Festal
@davidfestal
Jun 06 2016 23:40
I'm reinstalling now