HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.17k stars 654 forks source link

Class<haxe.macro.Compiler> has no field setCustomJSGenerator #8556

Open andyli opened 5 years ago

andyli commented 5 years ago

Somehow the #5172 test started failing in CI.

Build log:

2019-07-15T22:50:14.5927526Z Command: haxe [build.hxml]
2019-07-15T22:50:28.3324791Z utest/ui/text/PrintReport.hx:52: 
2019-07-15T22:50:28.3324914Z assertations: 1096
2019-07-15T22:50:28.3325116Z successes: 1095
2019-07-15T22:50:28.3325472Z errors: 1
2019-07-15T22:50:28.3326876Z failures: 0
2019-07-15T22:50:28.3327612Z warnings: 0
2019-07-15T22:50:28.3327840Z execution time: 12.45
2019-07-15T22:50:28.3328040Z 
2019-07-15T22:50:28.3328275Z results: SOME TESTS FAILURES (success: false)
2019-07-15T22:50:28.3328483Z cases.Issue5172
2019-07-15T22:50:28.3328662Z   test: ERROR ...E
2019-07-15T22:50:28.3329113Z     HaxeInvocationException(D:\a\1\s\win64Binaries\haxe\std/haxe/macro/ExampleJSGenerator.hx:255: characters 3-32 : Class<haxe.macro.Compiler> has no field setCustomJSGenerator
2019-07-15T22:50:28.3331276Z src/DisplayTestContext.hx:27: characters 26-36 : Unknown identifier : haxeserver
2019-07-15T22:50:28.3331632Z D:\a\1\s\win64Binaries\haxe\std/jvm/annotation/ClassReflectionInformation.hx:28: characters 46-77 : Type not found : java.lang.annotation.Annotation
2019-07-15T22:50:28.3331866Z 
2019-07-15T22:50:28.3332213Z , test, [--display,src/cases/Issue5172.hx@69@usage], package cases;
2019-07-15T22:50:28.3332359Z 
2019-07-15T22:50:28.3332695Z        class Main {
2019-07-15T22:50:28.3332869Z            static function main() {
2019-07-15T22:50:28.3333595Z                for (i in 0...10) {
2019-07-15T22:50:28.3333909Z                    i;
2019-07-15T22:50:28.3334446Z                }
2019-07-15T22:50:28.3335438Z            }
2019-07-15T22:50:28.3336930Z        }
2019-07-15T22:50:28.3340178Z    ])
2019-07-15T22:50:28.3344683Z Called from local function #1 (src/cases/Issue5172.hx line 13 column 2)
2019-07-15T22:50:28.3346599Z Called from cases.Issue5172.test (src/cases/Issue5172.hx line 17 column 26)
2019-07-15T22:50:28.3348377Z Called from DisplayTestContext.usage (src/DisplayTestContext.hx line 76 column 27)
2019-07-15T22:50:28.3480379Z Called from DisplayTestContext.callHaxe (src/DisplayTestContext.hx line 109 column 4)
2019-07-15T22:50:28.3483239Z 
2019-07-15T22:50:28.3504550Z Command exited with 1 in 14s: haxe [build.hxml]
RealyUniqueName commented 5 years ago

Looks like a random fail. At least it doesn't fail since then. Let's wait for a while and close the issue if it won't happen again.

Simn commented 5 years ago

I have no idea how something like that happens... but I agree that there's not much value in keeping the issue open as it didn't happen again.

RealyUniqueName commented 5 years ago

This started to happen pretty often recently https://dev.azure.com/HaxeFoundation/GitHubPublic/_build/results?buildId=497&view=logs&jobId=d81420a3-bf30-5d37-575b-fa6a2af01070

Simn commented 5 years ago

I noticed that too... It almost looks like the jvm package is not excluded somewhere, but I have no idea why this isn't deterministic.

tobil4sk commented 3 years ago

This is probably not gonna be useful at all... but who knows:

On my fork I had a very similar issue on one of my commits (only for windows64-test (macro), everything else worked fine).

I thought the issue was weird so I reran the jobs, and consistently on that commit I would get the same error for that same test. Eventually I gave up, and after pushing a commit where all I did was fix inconsistent indentation in an ocaml file, suddenly the issue disappeared.

I got a slightly different output I think:

utest/ui/text/PrintReport.hx:52: 
assertations: 1166
successes: 1165
errors: 1
failures: 0
warnings: 0
execution time: 24.601

results: SOME TESTS FAILURES (success: false)
cases.Issue5172
  test: ERROR ...E
    HaxeInvocationException(src/DisplayTestContext.hx:27: characters 26-36 : Unknown identifier : haxeserver
D:\a\haxec\haxec\win64Binaries\haxe_20210828031944_de8fbf6\std/haxe/macro/ExampleJSGenerator.hx:102: characters 12-17 : Class<haxe.macro.Context> has no field error
D:\a\haxec\haxec\win64Binaries\haxe_20210828031944_de8fbf6\std/sys/thread/Lock.hx:26: characters 8-52 : This class is not available on this target

, test, [--display,src/cases/Issue5172.hx@69@usage], package cases;

        class Main {
            static function main() {
                for (i in 0...10) {
                    i;
                }
            }
        }
    ])
Called from local function #1 (src/cases/Issue5172.hx line 13 column 2)
Called from cases.Issue5172.test (src/cases/Issue5172.hx line 17 column 26)
Called from DisplayTestContext.usage (src/DisplayTestContext.hx line 76 column 27)
Called from DisplayTestContext.callHaxe (src/DisplayTestContext.hx line 113 column 4)

Command exited with 1 in 26s: haxe [build.hxml]
test macro failed