cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
432 stars 60 forks source link

Homebrew test block fails for 1.0.105 #472

Closed ilovezfs closed 6 years ago

ilovezfs commented 6 years ago
==> /usr/local/Cellar/kobalt/1.0.105/bin/kobaltw assemble
Picked up _JAVA_OPTIONS:  -Duser.home=/Users/joe/Library/Caches/Homebrew/java_cache
Downloading https://github.com/cbeust/kobalt/releases/download/1.0.105/kobalt-1.0.105.zip
[Wrapper] Downloaded https://github.com/cbeust/kobalt/releases/download/1.0.105/kobalt-1.0.105.zip
Picked up _JAVA_OPTIONS:  -Duser.home=/Users/joe/Library/Caches/Homebrew/java_cache
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/Users/joe/Library/Caches/Homebrew/java_cache/.kobalt/wrapper/dist/kobalt-1.0.105/kobalt/wrapper/kobalt-1.0.105.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
              __ __           __              __   __ 
             / //_/  ____    / /_   ____ _   / /  / /_
            / ,<    / __ \  / __ \ / __ `/  / /  / __/
           / /| |  / /_/ / / /_/ // /_/ /  / /  / /_  
          /_/ |_|  \____/ /_.___/ \__,_/  /_/   \__/  1.0.105

Downloaded artifact org.jetbrains.kotlin:kotlin-compiler-embeddable:pom:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-stdlib:pom:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains:annotations:pom:13.0 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-script-runtime:pom:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-reflect:pom:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-compiler-embeddable:jar:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-stdlib:jar:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains:annotations:jar:13.0 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-script-runtime:jar:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-reflect:jar:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-runtime:pom:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
Downloaded artifact org.jetbrains.kotlin:kotlin-runtime:jar:1.2.21 from Maven (http://repo1.maven.org/maven2/, default, releases+snapshots)
  Regular compilation time: 1646 ms
Parallel build starting
     ?????????????????
     ? Building test ?
     ?????????????????
????? test:compile
  Kotlin 1.2.21 compiling 1 file
  Kotlin incremental compilation is enabled
*****
***** ERROR Couldn't compile file: Source file or directory not found: /var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/./src/main/kotlin/com/A.kt
*****
*****
***** ERROR Couldn't compile file: Source file or directory not found: /var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/./src/main/kotlin/com/A.kt
*****
*****
***** ERROR Error: com.beust.kobalt.KobaltException: Couldn't compile file: Source file or directory not found: /var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/./src/main/kotlin/com/A.kt
*****

Thread report
??????????????????????????????????????????
?  Time (sec) ? Thread 21                ?
??????????????????????????????????????????
?  0          ? test                     ?
??????????????????????????????????????????
PARALLEL BUILD SUCCESSFUL (0 SECONDS), sequential build would have taken 0 seconds
/usr/local/Homebrew/Library/Homebrew/test.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: /usr/local/Cellar/kobalt/1.0.105/bin/kobaltw assemble
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:

which runs

  test do
    (testpath/"src/main/kotlin/com/A.kt").write <<~EOS
      package com
      class A
      EOS

    (testpath/"kobalt/src/Build.kt").write <<~EOS
      import com.beust.kobalt.*
      import com.beust.kobalt.api.*
      import com.beust.kobalt.plugin.packaging.*

      val p = project {
        name = "test"
        version = "1.0"
        assemble {
          jar {}
        }
      }
    EOS

    system "#{bin}/kobaltw", "assemble"
    output = "kobaltBuild/libs/test-1.0.jar"
    assert_predicate testpath/output, :exist?, "Couldn't find #{output}"
  end
cbeust commented 6 years ago

Yes, we're aware. I filed this issue for the Kotlin compiler. This works fine with the 1.2.10 version of kotlinc.

I'm hesitant reverting Kobalt to that version of the compiler since I want the JetBrains engineer to be able to reproduce the problem easily.

ilovezfs commented 6 years ago

@cbeust no worries. We'll just skip 1.0.105 for now

cbeust commented 6 years ago

Should be fixed in 1.0.110.

ilovezfs commented 6 years ago

Fix worked! Thank you @cbeust!