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

2nd
Jun 2016
Gavin King
@gavinking
Jun 02 2016 14:17
Fuck. The “make shared” quick fixes are broken
fuck fuck fuck
where is the old Java code
Bastien Jansen
@bjansen
Jun 02 2016 14:18
AddAnnotionProposal
what's broken btw @gavinking ?
Gavin King
@gavinking
Jun 02 2016 14:22
Well, no surprising
addAddAnnotationProposal() is totally different WTF
@bjansen it assumes that we’re adding an annotation to a declaration in the same file
which if course isn’t true in general
Bastien Jansen
@bjansen
Jun 02 2016 14:25
oh, it's using the wrong phasedUnit
David Festal
@davidfestal
Jun 02 2016 14:25
there are some subtlties in CeylonParseController
David Festal
@davidfestal
Jun 02 2016 14:26
about the last typechecked PhasedUnit, te last typechecked rootNode, the last parsed root node (but possibly not typechecked, etc...
this is documented
don't know if your problem is related to that
Gavin King
@gavinking
Jun 02 2016 14:28
@bjansen so apparently it used to use a function named getPhasedUnit() … where was that declared?
Bastien Jansen
@bjansen
Jun 02 2016 14:28
a formal function that was refined by each IDE I suppose
but now you should be able to do what the old Java code did
Gavin King
@gavinking
Jun 02 2016 14:28
so it’s gone now?
ok
Bastien Jansen
@bjansen
Jun 02 2016 14:28
we have access to ProjectPhasedUnits etc
David Festal
@davidfestal
Jun 02 2016 14:29
This message was deleted
Bastien Jansen
@bjansen
Jun 02 2016 14:29
I mean AnyModifiableSourceFile
and ModifiablePhasedUnit
David Festal
@davidfestal
Jun 02 2016 14:30
what is the problem exactly ?
Gavin King
@gavinking
Jun 02 2016 14:31
yes, I got it i think
Gavin King
@gavinking
Jun 02 2016 14:47
@davidfestal seriously, this is necessary?!
        is AnyModifiableSourceFile unit = dec.unit,
        is PhasedUnit phasedUnit = unit.phasedUnit,
Surely AnyModifiableSourceFile.phasedUnit is always a PhasedUnit?
David Festal
@davidfestal
Jun 02 2016 14:47
where is this ?
I'm surprised ;-)
Gavin King
@gavinking
Jun 02 2016 14:48
in the code I’m writing to fix that bug
David Festal
@davidfestal
Jun 02 2016 14:48
did I write this at 1:00 AM ?
Bastien Jansen
@bjansen
Jun 02 2016 14:48
it might be null
David Festal
@davidfestal
Jun 02 2016 14:48
sure it might be null yes
Gavin King
@gavinking
Jun 02 2016 14:48
ah, ok, sorry
I misunderstood
Bastien Jansen
@bjansen
Jun 02 2016 14:48
so is PhasedUnit could simply be replaced with exists I guess
Gavin King
@gavinking
Jun 02 2016 14:48
with all the type parameters
sure, done
ok fine
David Festal
@davidfestal
Jun 02 2016 14:49
but PhasedUnit is the root type of the hierarchy, so it's a bit strange to have written this anyway
Gavin King
@gavinking
Jun 02 2016 14:49
precisely why could it be null though?
David Festal
@davidfestal
Jun 02 2016 14:49
in all generality, phasedUnit an be null, because it's held by a weak ref to the PhasedUnit of the typechecker
and if
the PhasedUnit has been freed but the Unit is still kept as a reference somewhere
then unit.phasedUnit will be null
but
this is not a good design probably
This is the source of a bug reported some time ago
For ProjectSourceFilefor example, we should reload the PhasedUnit from the current typechecker when it's null
Gavin King
@gavinking
Jun 02 2016 14:53
surely
David Festal
@davidfestal
Jun 02 2016 14:53
However there might still be a moment (during a full rebuld), where the old PhasedUnit has been freed and a new one still has not been created .
currentlty
but also I'll have a look to this because we might allow keeping a reference to the old PhasedUnits untilthe new PhasedUnits have been parsed during a full build
this would allow to never have a situation where the PhasedUnit of a ProjectSourceFile is null
However doing this will increase the memory requirement of the full build
sice it implies that during a small moment we has twice the number of PhasedUnits kept in memory
That's why I've not made this change until now
Stéphane Épardaud
@FroMage
Jun 02 2016 15:01
I can't seem to use the Ceylon Eclipse IDE anymore
David Festal
@davidfestal
Jun 02 2016 15:01
what's the problem ?
Stéphane Épardaud
@FroMage
Jun 02 2016 15:01
Caused by: java.lang.NoClassDefFoundError: com/redhat/ceylon/ide/common/platform/DocumentServices
    at com.redhat.ceylon.eclipse.platform.platformJ2C.platformServices(platformJ2C.java:13)
    at com.redhat.ceylon.eclipse.ui.CeylonPlugin.start(CeylonPlugin.java:148)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
    ... 63 more
Caused by: java.lang.ClassNotFoundException: com.redhat.ceylon.ide.common.platform.DocumentServices cannot be found by com.redhat.ceylon.eclipse.ui_1.2.3.v20160602-1451-Final
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 69 more
at run-time
David Festal
@davidfestal
Jun 02 2016 15:02
di you run in debug or in your main Eclipse ?
Stéphane Épardaud
@FroMage
Jun 02 2016 15:02
in my main Eclipse
David Festal
@davidfestal
Jun 02 2016 15:03
strange. maybe @bjansen and @gavinking have an idea. i've touched the Eclipse plugin since several days.
Bastien Jansen
@bjansen
Jun 02 2016 15:03
@FroMage I think you should do a clean build and install the plugin again
Stéphane Épardaud
@FroMage
Jun 02 2016 15:04
good idea
Stéphane Épardaud
@FroMage
Jun 02 2016 15:11
Eclipse: "Install this local package?" Me: Sure… waits ten minutes for a local file to be installed… Eclipse: "Would you like to restart?" Me: "No, actually I wouldn't like that but I don't have much of a choice you thug"
Stéphane Épardaud
@FroMage
Jun 02 2016 15:39
same thing :(
you guys don't have that issue?
Gavin King
@gavinking
Jun 02 2016 15:48
@FroMage yes, I have this isse in spades
Stéphane Épardaud
@FroMage
Jun 02 2016 15:48
oh ok, so it's not just me
the exception you mean? or were you talking about the installation speed
Gavin King
@gavinking
Jun 02 2016 15:53
which exception?
oh the NoClassDefFoundError? No, I don’t have it
Stéphane Épardaud
@FroMage
Jun 02 2016 15:54
shit
so I'm stuck with a non-working IDE
Gavin King
@gavinking
Jun 02 2016 15:58
@FroMage wait, what Eclipse do you have
if you say “Neon” then that is the problem
Stéphane Épardaud
@FroMage
Jun 02 2016 15:58
no, not neon, it's mars.2
Gavin King
@gavinking
Jun 02 2016 15:58
same as me then
Gavin King
@gavinking
Jun 02 2016 19:21
@davidfestal did something change recently in the Eclipse plugin that would cause lockups during completion?
Bastien Jansen
@bjansen
Jun 02 2016 19:31
there's always been lockups during completion, when it loads declarations
Gavin King
@gavinking
Jun 02 2016 19:34
well I have never experienced this until I tried working on the intellij plugin
so something is very wrong
David Festal
@davidfestal
Jun 02 2016 19:34
@gavinking : I don't know. I haven'tdone anything in this area afaik. In fact I've not done anything significant on the Eclipse side for a while.
Gavin King
@gavinking
Jun 02 2016 19:34
i can’t even cancel it
Bastien Jansen
@bjansen
Jun 02 2016 19:34
dude, I've literally whined about this for a year
David Festal
@davidfestal
Jun 02 2016 19:34
I experience this regularly whileworking on the IDEA plugin
Bastien Jansen
@bjansen
Jun 02 2016 19:34
but no one believed me
Gavin King
@gavinking
Jun 02 2016 19:35
@davidfestal well why has nobody investigated the cause?
Bastien Jansen
@bjansen
Jun 02 2016 19:35
it's slow because it has to work on a 120MB dependency
David Festal
@davidfestal
Jun 02 2016 19:35
the Idea project has very huge dependencies
Bastien Jansen
@bjansen
Jun 02 2016 19:35
so obviously, scanning all the declarations takes time
David Festal
@davidfestal
Jun 02 2016 19:35
@gavinking didn't have time
but I'm about to start the indexing of dependencies in modules
which is precisely to avoid this full package scanning
I had added a way to cancel the declaration search inside the model
but visibly the cancellable (progress monitor) is not passed in all cases
so in some cases it allows cancelling but in some others it doesn't
Gavin King
@gavinking
Jun 02 2016 19:39
@bjansen well set up a filter
to filter out stuff that shouldn’t get completed
and push the setting to git (I believe that’s possible)
Bastien Jansen
@bjansen
Jun 02 2016 19:40
well I can potentially need any class in that jar, so filters won't help much
Gavin King
@gavinking
Jun 02 2016 19:40
you need to complete them?
there are no packages which are non-API?
Bastien Jansen
@bjansen
Jun 02 2016 19:41
sometimes I extend things that are non-API
Gavin King
@gavinking
Jun 02 2016 19:41
well look: completion is currently useless
because it locks up the IDE
so it seems like not being able to complete everything is better than not being able to complete anything