eugenkiss / kotlinfx

UNMAINTAINED: A layer on top of JavaFX to make better use of Kotlin's features.
MIT License
52 stars 8 forks source link

Building problems #11

Open bbarker opened 9 years ago

bbarker commented 9 years ago

Hi,

I was hoping to update kotlinfx to M11, but I may have too many knowledge gaps. For instance, I'm having trouble building even with the current M10:

$ ~/gradle-2.3/bin/gradle build
:compileKotlin
w: Annotations path entry points to a non-existent location:
e: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\GenKalium.kt: (49, 53): Type mismatch: inferred type is java.util.ArrayList<java.lang.reflect.TypeVariable<java.lang.Class<out java.lang.Object!>!>!> but kotlin.MutableList<java.lang.reflect.TypeVariable<out java.lang.Class<out java.lang.Object>?>?> was expected
e: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\GenKalium.kt: (50, 63): Type mismatch: inferred type is java.util.ArrayList<java.lang.reflect.TypeVariable<java.lang.Class<out java.lang.Object!>!>!> but kotlin.MutableList<java.lang.reflect.TypeVariable<out java.lang.Class<out java.lang.Object>?>?> was expected
e: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\GenPropAbbrs.kt: (49, 53): Type mismatch: inferred type is java.util.ArrayList<java.lang.reflect.TypeVariable<java.lang.Class<out java.lang.Object!>!>!> but kotlin.MutableList<java.lang.reflect.TypeVariable<out java.lang.Class<out java.lang.Object>?>?> was expected
e: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\GenPropAbbrs.kt: (50, 63): Type mismatch: inferred type is java.util.ArrayList<java.lang.reflect.TypeVariable<java.lang.Class<out java.lang.Object!>!>!> but kotlin.MutableList<java.lang.reflect.TypeVariable<out java.lang.Class<out java.lang.Object>?>?> was expected
e: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\GenProperties.kt: (73, 53): Type mismatch: inferred type is java.util.ArrayList<java.lang.reflect.TypeVariable<java.lang.Class<out java.lang.Object!>!>!> but kotlin.MutableList<java.lang.reflect.TypeVariable<out java.lang.Class<out java.lang.Object>?>?> was expected
e: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\GenProperties.kt: (74, 63): Type mismatch: inferred type is java.util.ArrayList<java.lang.reflect.TypeVariable<java.lang.Class<out java.lang.Object!>!>!> but kotlin.MutableList<java.lang.reflect.TypeVariable<out java.lang.Class<out java.lang.Object>?>?> was expected
w: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\Util.kt: (28, 88): This class shouldn't be used in Kotlin. Use kotlin.Any instead.
w: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\Util.kt: (32, 78): Unnecessary non-null assertion (!!) on a non-null receiver of type kotlin.String
w: C:\cygwin64\home\brand_000\kotlinfx\src\main\kotlin\Util.kt: (36, 83): This class shouldn't be used in Kotlin. Use kotlin.Any instead.
:compileKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 11.782 secs

How do you normally build? I also tried fixing the first error in code a bit, but the types was rather complex and I wasn't able to get anywhere easily.

eugenkiss commented 9 years ago

Hi Brandon,

your report is noted. I'm currently out of town so I'm going to take a closer look at your issues in a couple of days. What I see from a glance is that the code generating scripts don't work anymore with M10/M11 but the core files themselves should work with M10. If you just build the core-subproject with I think gradle kotlinfx-core:build or something like that it should work with M10. Normally, I just use Intellij IDEA and to publish an artifact I use gradle on the command line. But I didn't generate new bindings for al long time (it just wasn't needed) so I didn't encounter that the code generating scripts don't work.

bbarker commented 9 years ago

Great, that does it, I just had a few warnings with M10:

$ ~/gradle-2.3/bin/gradle kotlinfx-core:build :kotlinfx-core:compileKotlin w: Annotations path entry points to a non-existent location: w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Control.kt: (42, 13): 'T' has a nullable upper bound. This means that a value of this type may be null. Using 'T?' is likely to mislead the reader w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Control.kt: (518, 13): 'T' has a nullable upper bound. This means that a value of this type may be null. Using 'T?' is likely to mislead the reader w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Text.kt: (29, 9): Name shadowed: x w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Transform.kt: (19, 9): Name shadowed: x w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Transform.kt: (31, 9): Name shadowed: x w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Transform.kt: (52, 9): Name shadowed: x w: C:\cygwin64\home\brand_000\kotlinfx\kotlinfx-core\src\main\kotlin\kotlinfx\builders\Transform.kt: (63, 9): Name shadowed: x

I fixed some trivial depredations for M11 separately.

Hi Brandon,

your report is noted. I'm currently out of town so I'm going to take a closer look at your issues in a couple of days. What I see from a glance is that the code generating scripts don't work anymore with M10/M11 but the core files themselves should work with M10. If you just build the core-subproject with I think gradle kotlinfx-core:build or something like that it should work with M10. Normally, I just use Intellij IDEA and to publish an artifact I use gradle on the command line. But I didn't generate new bindings (this shouldn't be needed) so I didn't encounter that the code generating scripts don't work.

— Reply to this email directly or view it on GitHub https://github.com/eugenkiss/kotlinfx/issues/11#issuecomment-84095542.