ceylon-ide-eclipse icon indicating copy to clipboard operation
ceylon-ide-eclipse copied to clipboard

incremental build bug in mixed-source project

Open gavinking opened this issue 9 years ago • 6 comments

I have a module with this ceylon class:

class Foo(shared String foo) {}

This Java class:

package bug;

import ceylon.language.Array;
import ceylon.language.List;

public class Java {

    public static List<? extends Foo> foos = 
            new Array<Foo>(Foo.$TypeDescriptor$, 10, new Foo(""));

}

And finally, this Ceylon function:

shared void run() {
    for (foo in Java.foos) {
        print(foo.foo);
    }
}

If I edit the definition of Foo to change the name of its parameter (e.g. foo->bar), the model does not seem to be cleanly updated, and I need to do a clean build.

gavinking avatar Apr 27 '15 08:04 gavinking

Note that this problem does not occur if I'm iterating a list declared in Ceylon, nor if I use an explicit type declaration in for:

    for (Foo foo in Java.foos) {
        print(foo.foo);
    }

Is just fine.

Very strange!

gavinking avatar Apr 27 '15 08:04 gavinking

My guess is that the model of the Java class is not updated during the incremental build, and holds on to the previous model of Foo.

gavinking avatar Apr 27 '15 08:04 gavinking

It appears that dependencies from Java units to Ceylon units are not tracked. So run.ceylon is not transitively added to files to rebuild after the modification of Foo.ceylon

davidfestal avatar May 07 '15 10:05 davidfestal

Yes this was my guess.

Sent from my iPhone

On 7 May 2015, at 12:21 pm, David Festal [email protected] wrote:

It appears that dependencies from Java units to Ceylon units are not tracked. So run.ceylon is not transitively added to files to rebuild after the modification of Foo.ceylon

— Reply to this email directly or view it on GitHub.

gavinking avatar May 07 '15 10:05 gavinking

and it appears that correctly managing them is not as simple as it might seem :-/

davidfestal avatar May 12 '15 12:05 davidfestal

let's postpone for after 1.2

davidfestal avatar May 29 '15 14:05 davidfestal