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

4th
Mar 2016
Bastien Jansen
@bjansen
Mar 04 2016 10:40
so, I updated the plugin this morning, and it looks like it fails to load a class in ceylon-ide-intellij
type of parameter 'change' of 'getTextEditOffset' declared by 'IdeaQuickFix' is different to type of corresponding parameter 'change' of refined member 'getTextEditOffset' of 'AbstractQuickFix': 'TextEdit' ('TextChange') is not exactly 'TextEdit' ('unknown')
that 'TextEdit' ('unknown') is strange
I had no build error before the update
@davidfestal how can I debug that to find the root cause?
David Festal
@davidfestal
Mar 04 2016 10:42
didn't you debug IntelliJ from Eclipse some times ago ?
afair that was the first reason why I implemented Ceylon-aware run configurations
Bastien Jansen
@bjansen
Mar 04 2016 10:43
I mean I have a build error when I build ceylon-ide-intellij from eclipse
David Festal
@davidfestal
Mar 04 2016 10:43
you can use a Ceylon-aware remote Java run configuration
Ah
Can't you debug the plugin itself ?
Bastien Jansen
@bjansen
Mar 04 2016 10:44
I'm not sure how to reproduce the problem
David Festal
@davidfestal
Mar 04 2016 10:44
FYI I have a secondary git repo here in which I have the ceylon plugin projects (eclipse and common)
and I can open those projects from the secondary repo
in my debugged eclipse
that works quite well
to avoid interfering on the same projects while debugging te IDE with the debugged IDE :-)
Bastien Jansen
@bjansen
Mar 04 2016 10:45
hmm that seems like a good idea
Bastien Jansen
@bjansen
Mar 04 2016 14:08
oh in fact I have the same error with the CLI compiler
but I didn't change anything in that code
Stéphane Épardaud
@FroMage
Mar 04 2016 14:09
make sure to report it fast
in time for the 1.2.2 release ;)
Bastien Jansen
@bjansen
Mar 04 2016 14:10
I'm trying to make a simple test case to reproduce this
Stéphane Épardaud
@FroMage
Mar 04 2016 14:10
good
@davidfestal how are you wrt to a 1.2.2 IDE release?
ready?
or still issues blocking?
Gavin King
@gavinking
Mar 04 2016 14:14
New ceylon/ceylon-ide-eclipse#1713
David Festal
@davidfestal
Mar 04 2016 14:15
@FroMage : I was OK last week
but came back to master then
it should be OK
Stéphane Épardaud
@FroMage
Mar 04 2016 14:16
OK in that case
Could you check out my android branch?
and see what it needs to work with the IDE?
David Festal
@davidfestal
Mar 04 2016 14:17
pff. I'm currently wrestling with abstraction stuff on master...
Stéphane Épardaud
@FroMage
Mar 04 2016 14:17
it's not urgent man
David Festal
@davidfestal
Mar 04 2016 14:17
but, yes, I can do that I assume ;-)
Stéphane Épardaud
@FroMage
Mar 04 2016 14:17
it can wait until after your abstraction
it's not necessarily for 1.2.2
David Festal
@davidfestal
Mar 04 2016 14:18
no no, it's just I'm in the middle for something
but I can do it just after if you want
Stéphane Épardaud
@FroMage
Mar 04 2016 14:18
if it can fit in then great, if not that's OK
David Festal
@davidfestal
Mar 04 2016 14:18
OK
I'll keep you informed
when do you want to release 1.2.2 ?
Stéphane Épardaud
@FroMage
Mar 04 2016 14:19
ok, when you're ready, tell me and I'll tell you what the changes are that require IDE work
David Festal
@davidfestal
Mar 04 2016 14:19
you're ready to do it ?
Stéphane Épardaud
@FroMage
Mar 04 2016 14:20
to do what?
oh 1.2.2
it's not clear
we're still waiting for resolution of the last JS blocker
hopefully when that is done we'll postpone every other issue
Gavin King
@gavinking
Mar 04 2016 14:21
I also want to get the hash code caching stuff in
that @jvasileff was working on
David Festal
@davidfestal
Mar 04 2016 14:22
ok
Stéphane Épardaud
@FroMage
Mar 04 2016 14:22
but that's purely sdk, no?
Bastien Jansen
@bjansen
Mar 04 2016 15:01
guys, I need help, I have no clue why ceylon-ide-intellij is suddenly broken
could one of you pull ide-common and ide-intellij and build them?
ant build in ceylon-ide-intellij/plugin-ceylon-code
I suspect it has to do with type aliases
I get this error:
error: type parameter 'CommonInsertEdit' of declaration 'GenericQuickFix' has argument 'InsertEdit' which is not assignable to upper bound 'TextEdit' of 'CommonInsertEdit'
InsertEdit satisfies SomeInterface, and TextEdit is an alias for SomeInterface, so it should definitely be assignable
Gavin King
@gavinking
Mar 04 2016 15:05
@FroMage yes
Bastien Jansen
@bjansen
Mar 04 2016 15:37
Open Declaration is broken in my eclipse
it lost its shortcut, and throws Exceptions
!MESSAGE An internal error occurred during: "Items filtering".
!STACK 0
java.lang.ClassCastException: com.redhat.ceylon.eclipse.core.model.mirror.UnknownTypeMirror cannot be cast to java.util.List
    at com.redhat.ceylon.model.loader.AbstractModelLoader.manageNativeBackend(AbstractModelLoader.java:3056)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.makeLazyClass(AbstractModelLoader.java:1601)
    at com.redhat.ceylon.ide.common.model.BaseIdeModelLoader.makeLazyClass(IdeModelLoader.ceylon:329)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.createDeclaration(AbstractModelLoader.java:1162)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.convertToDeclaration(AbstractModelLoader.java:632)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.convertToDeclaration(AbstractModelLoader.java:597)
    at com.redhat.ceylon.ide.common.model.BaseIdeModelLoader.convertToDeclaration(IdeModelLoader.ceylon:507)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader$3$1.$call$(IdeModelLoader.ceylon:790)
    at ceylon.language.Iterable$impl.each(Iterable.ceylon:322)
    at ceylon.language.impl.BaseIterable.each(bases.ceylon)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader$3.$call$(IdeModelLoader.ceylon:784)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader$3.$call$(IdeModelLoader.ceylon:746)
    at com.redhat.ceylon.ide.common.util.synchronize_.synchronize(synchronize_.java:33)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader.loadPackage(IdeModelLoader.ceylon:803)
    at com.redhat.ceylon.model.loader.model.LazyPackage.getMembers(LazyPackage.java:177)
    at com.redhat.ceylon.eclipse.code.open.OpenDeclarationDialog.fill(OpenDeclarationDialog.java:952)
    at com.redhat.ceylon.eclipse.code.open.OpenDeclarationDialog.fillContentProvider(OpenDeclarationDialog.java:934)
    at com.redhat.ceylon.eclipse.code.open.FilteredItemsSelectionDialog$FilterJob.filterContent(FilteredItemsSelectionDialog.java:2245)
    at com.redhat.ceylon.eclipse.code.open.FilteredItemsSelectionDialog$FilterJob.internalRun(FilteredItemsSelectionDialog.java:2196)
    at com.redhat.ceylon.eclipse.code.open.FilteredItemsSelectionDialog$FilterJob.doRun(FilteredItemsSelectionDialog.java:2168)
    at com.redhat.ceylon.eclipse.code.open.FilteredItemsSelectionDialog$FilterJob.run(FilteredItemsSelectionDialog.java:2155)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.core.jobs 4 2 2016-03-04 16:36:09.939
!MESSAGE An internal error occurred during: "Items filtering".
!STACK 0
java.lang.ClassCastException: com.redhat.ceylon.eclipse.core.model.mirror.UnknownTypeMirror cannot be cast to java.lang.Boolean
    at com.redhat.ceylon.model.loader.AbstractModelLoader.hasConstructors(AbstractModelLoader.java:1306)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.createDeclaration(AbstractModelLoader.java:1141)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.convertToDeclaration(AbstractModelLoader.java:632)
    at com.redhat.ceylon.model.loader.AbstractModelLoader.convertToDeclaration(AbstractModelLoader.java:597)
    at com.redhat.ceylon.ide.common.model.BaseIdeModelLoader.convertToDeclaration(IdeModelLoader.ceylon:507)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader$3$1.$call$(IdeModelLoader.ceylon:790)
    at ceylon.language.Iterable$impl.each(Iterable.ceylon:322)
    at ceylon.language.impl.BaseIterable.each(bases.ceylon)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader$3.$call$(IdeModelLoader.ceylon:784)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader$3.$call$(IdeModelLoader.ceylon:746)
    at com.redhat.ceylon.ide.common.util.synchronize_.synchronize(synchronize_.java:33)
    at com.redhat.ceylon.ide.common.model.IdeModelLoader.loadPackage(IdeModelLoader.ceylon:803)
    at com.redhat.ceylon.model.loader.model.LazyPackage.getMembers(LazyPackage.java:177)
    at com.redhat.ceylon.eclipse.code.open.OpenDeclarationDialog.fill(OpenDeclarationDialog.java:952)
    at com.redhat.ceylon.eclipse.code.open.OpenDeclarationDialog.fillContentProvider(OpenDeclarationDialog.java:934)
    at com.redhat.ceylon.eclipse.code.open.FilteredItemsSelectionDialog$Filte
Also, I get an error Imported declaration not found: HashSet but I can see that class (with the correct package) in Open Declaration
Bastien Jansen
@bjansen
Mar 04 2016 16:03
pff everything went back to normal
David Festal
@davidfestal
Mar 04 2016 16:03
OK
During the abstraction of the typechecking / build, I have to manage progress monitors correctly
Bastien Jansen
@bjansen
Mar 04 2016 16:04
don't really know what happened, I rebuilt everything and found a fix for my initial problem
David Festal
@davidfestal
Mar 04 2016 16:04
and, exactly like the last time I touched them, Eclipse progress monitors are just a nightmare
Ans I'd like our progress monitor abstraction to be simpler, less surprise-prone, while still having the right behavior in Eclipse
Bastien Jansen
@bjansen
Mar 04 2016 16:06
can I use the abstracted setupCeylonModel() now?
David Festal
@davidfestal
Mar 04 2016 16:06
parseCeylonModel ?
you should yes
Bastien Jansen
@bjansen
Mar 04 2016 16:07
yes parseCeylonModel sorry
ok
David Festal
@davidfestal
Mar 04 2016 16:07
it should be good, if you have implemented all the new stuff required by CeylonProject, etc ...
it shoujld work
but still check that it does what you do
I mean, you might need some additional step (at the end for example)
in this case we can add formal methods
Bastien Jansen
@bjansen
Mar 04 2016 16:08
ah great I don't have to build the typechecker myself anymore
David Festal
@davidfestal
Mar 04 2016 16:08
no :-)
and my next step is the incremental typechecking / build
Bastien Jansen
@bjansen
Mar 04 2016 16:09
ok
David Festal
@davidfestal
Mar 04 2016 16:09
but I'm wrestling with progress monitors for now :-(
This message was deleted
Bastien Jansen
@bjansen
Mar 04 2016 16:09
you're making good progress :D
David Festal
@davidfestal
Mar 04 2016 16:09
haha, and you are the progress monitor ^^
I see I see
Bastien Jansen
@bjansen
Mar 04 2016 16:10
my joke was absolutely not intended :$
David Festal
@davidfestal
Mar 04 2016 16:11
Ah really? but it was very amusing !
you made me laugh alone :-)
Bastien Jansen
@bjansen
Mar 04 2016 16:11
even better with your remark ;)
David Festal
@davidfestal
Mar 04 2016 16:11
which is quite a challenge fro someone working on Eclipse progress monitors ;-)
Bastien Jansen
@bjansen
Mar 04 2016 16:13
does parseCeylonModel automatically add ceylon.language to the current project?
David Festal
@davidfestal
Mar 04 2016 16:13
have a look inside it
but I assume since it calls prepareForTypechecking() afair
Bastien Jansen
@bjansen
Mar 04 2016 16:13
because in my previous version I had to do it between parseCeylonModel and fullTypeCheck
David Festal
@davidfestal
Mar 04 2016 16:13
have a look inside the code
really ?
did you have the same exact copy as parseCeylonModel ?
Bastien Jansen
@bjansen
Mar 04 2016 16:14
it was very similar, yes
    private void parseCeylonModel() {
        final IdeaCeylonProject ceylonProject = (IdeaCeylonProject) ceylonModel.getProject(module);


        BaseIdeModuleManager mm = (BaseIdeModuleManager) typeChecker.getPhasedUnits().getModuleManager();
        mm.setTypeChecker(typeChecker);
        mm.getModuleSourceMapper().setTypeChecker(typeChecker);

        BaseIdeModelLoader loader = mm.getModelLoader();

        mm.prepareForTypeChecking();

        ceylonProject.scanFiles(new DummyProgressMonitor());

        loader.setupSourceFileObjects(typeChecker.getPhasedUnits().getPhasedUnits());
        typeChecker.getPhasedUnits().visitModules();

        ModuleValidator moduleValidator = new ModuleValidator(typeChecker.getContext(), typeChecker.getPhasedUnits());
        moduleValidator.verifyModuleDependencyTree();

        typeChecker.setPhasedUnitsOfDependencies(moduleValidator.getPhasedUnitsOfDependencies());

        for (PhasedUnits dependencyPhasedUnits : typeChecker.getPhasedUnitsOfDependencies()) {
            loader.addSourceArchivePhasedUnits(dependencyPhasedUnits.getPhasedUnits());
        }

        loader.setModuleAndPackageUnits();
    }
David Festal
@davidfestal
Mar 04 2016 16:17
look at this between visitModules() and the moduleValidator call:
                //By now the language module version should be known (as local)
                //or we should use the default one.
                Module languageModule = context.modules.languageModule;
                if (! languageModule.version exists) {
                    languageModule.version = TypeChecker.\iLANGUAGE_MODULE_VERSION;
                }

                if (monitor.cancelled) {
                    throw platformUtils.newOperationCanceledException("");
                }
it was already there in the Java version
Bastien Jansen
@bjansen
Mar 04 2016 16:18
maybe I missed something
I'll try with the abstracted version
David Festal
@davidfestal
Mar 04 2016 16:19
OK
Gavin King
@gavinking
Mar 04 2016 16:21
did we already report this one:
java.lang.NullPointerException
    at org.eclipse.ui.actions.SelectionListenerAction.resourceIsType(SelectionListenerAction.java:231)
    at org.eclipse.ui.actions.SelectionListenerAction.selectionIsOfType(SelectionListenerAction.java:254)
    at org.eclipse.ui.actions.CloseUnrelatedProjectsAction.resourceChanged(CloseUnrelatedProjectsAction.java:228)
    at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:152)
    at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:373)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1470)
@bjansen ?
Bastien Jansen
@bjansen
Mar 04 2016 16:22
ceylon/ceylon-ide-eclipse#1713
why are you asking me btw? :)
Gavin King
@gavinking
Mar 04 2016 16:23
cos I thought you had run into it
actually it’s one i ran into — but in a different circumstance
Bastien Jansen
@bjansen
Mar 04 2016 16:50
@davidfestal everything is working fine with the new abstraction
David Festal
@davidfestal
Mar 04 2016 16:50
cool !!!
Bastien Jansen
@bjansen
Mar 04 2016 16:50
I didn't expect that lol
it seems that loading a project is even faster than before
David Festal
@davidfestal
Mar 04 2016 16:51
Thanks for these good news :-)
Bastien Jansen
@bjansen
Mar 04 2016 16:51
(I have faith in your work, I didn't expect my code calling yours would work on the first run)
David Festal
@davidfestal
Mar 04 2016 16:52
what a challenge for me regarding the last steps which are also the hardest :-)
Bastien Jansen
@bjansen
Mar 04 2016 16:52
are you working on fullTypeCheck() now?
David Festal
@davidfestal
Mar 04 2016 16:53
indeed, I'm working on having the abstracted progress monitor calls in fullTypeCheck(), generateBinaries(), incrmentalBuild(), etc...working correctly inside Eclipse
and that's not easy
why do you ask specifically about fullTypeCheck) ?
this is not the hardest
the hardest is the incrementalpart of all this
Bastien Jansen
@bjansen
Mar 04 2016 16:54
because I copied it in intellij, so I should soon be able to remove that copy and use the abstraction ;)
David Festal
@davidfestal
Mar 04 2016 16:55
haha, I see
David Festal
@davidfestal
Mar 04 2016 17:02
I'm going for an hour. bbl