Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven build error requiring clean to build successfully #1041

Closed
wesbillman opened this issue Mar 7, 2024 · 2 comments · Fixed by #1048
Closed

Maven build error requiring clean to build successfully #1041

wesbillman opened this issue Mar 7, 2024 · 2 comments · Fixed by #1048
Assignees

Comments

@wesbillman
Copy link
Member

I tried building with just bit at the command line and get this error:

Running mvn -B -pl :ftl-runtime clean fixed it for me. I wonder if we should update the Justfile to run install-jars with a clean option to avoid this? Or maybe there's a better way with bit

….0-SNAPSHOT.jar| [WARNING] Using experimental Kotlin incremental compilation
….0-SNAPSHOT.jar| [INFO] Compiled 0 Kotlin files using incremental compiler
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] --- resources:3.3.1:testResources (default-testResources) @ ftl-runtime ---
….0-SNAPSHOT.jar| [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
….0-SNAPSHOT.jar| [INFO] skip non existing resourceDirectory /Users/wesbillman/dev/ftl/kotlin-runtime/ftl-runtime/src/test/resources
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] --- compiler:3.12.1:testCompile (default-testCompile) @ ftl-runtime ---
….0-SNAPSHOT.jar| [INFO] No sources to compile
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] --- kotlin:1.9.22:test-compile (test-compile) @ ftl-runtime ---
….0-SNAPSHOT.jar| [WARNING] Using experimental Kotlin incremental compilation
….0-SNAPSHOT.jar| [INFO] Compiled 0 Kotlin files using incremental compiler
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] --- surefire:3.2.5:test (default-test) @ ftl-runtime ---
….0-SNAPSHOT.jar| [INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] -------------------------------------------------------
….0-SNAPSHOT.jar| [INFO]  T E S T S
….0-SNAPSHOT.jar| [INFO] -------------------------------------------------------
….0-SNAPSHOT.jar| [INFO] Running xyz.block.ftl.secrets.SecretTest
….0-SNAPSHOT.jar| EnvironmentVariableExtension: This extension uses reflection to access and modify JDK internals, which is fragile.Have a look at the documentation for further details:https://junit-pioneer.org/docs/environment-variables/#warnings-for-reflective-access
….0-SNAPSHOT.jar| [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.054 s -- in xyz.block.ftl.secrets.SecretTest
….0-SNAPSHOT.jar| [INFO] Running xyz.block.ftl.registry.RegistryTest
….0-SNAPSHOT.jar| {"level":"debug","message":"Scanning for Verbs in ftl.test..."}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb time()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb echo()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb verb()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"Scanning for Verbs in ftl.test..."}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb time()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb echo()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb verb()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"Scanning for Verbs in ftl.test..."}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb time()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb echo()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb verb()"}
….0-SNAPSHOT.jar| [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.586 s -- in xyz.block.ftl.registry.RegistryTest
….0-SNAPSHOT.jar| [INFO] Running xyz.block.ftl.schemaextractor.ExtractSchemaRuleTest
….0-SNAPSHOT.jar| WARN: Attempt to load key 'platform.random.idempotence.check.rate' for not yet loaded registry
….0-SNAPSHOT.jar| [ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.346 s <<< FAILURE! -- in xyz.block.ftl.schemaextractor.ExtractSchemaRuleTest
….0-SNAPSHOT.jar| [ERROR] xyz.block.ftl.schemaextractor.ExtractSchemaRuleTest.extracts schema -- Time elapsed: 0.157 s <<< ERROR!
….0-SNAPSHOT.jar| java.lang.NoSuchMethodError: 'void xyz.block.ftl.v1.schema.Type.<init>(xyz.block.ftl.v1.schema.Int, xyz.block.ftl.v1.schema.Float, xyz.block.ftl.v1.schema.String, xyz.block.ftl.v1.schema.Bytes, xyz.block.ftl.v1.schema.Bool, xyz.block.ftl.v1.schema.Time, xyz.block.ftl.v1.schema.Array, xyz.block.ftl.v1.schema.Map, xyz.block.ftl.v1.schema.Any, xyz.block.ftl.v1.schema.Unit, xyz.block.ftl.v1.schema.DataRef, xyz.block.ftl.v1.schema.Optional, okio.ByteString, int, kotlin.jvm.internal.DefaultConstructorMarker)'
….0-SNAPSHOT.jar| 	at xyz.block.ftl.schemaextractor.ExtractSchemaRuleTest.extracts schema(ExtractSchemaRuleTest.kt:109)
….0-SNAPSHOT.jar| 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
….0-SNAPSHOT.jar| 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
….0-SNAPSHOT.jar| 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
….0-SNAPSHOT.jar|
….0-SNAPSHOT.jar| [INFO] Running xyz.block.ftl.ContextTest
….0-SNAPSHOT.jar| {"level":"debug","message":"Scanning for Verbs in ftl.test..."}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb time()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb echo()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb verb()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"Scanning for Verbs in ftl.test..."}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb time()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb echo()"}
….0-SNAPSHOT.jar| {"level":"debug","message":"      @Verb verb()"}
….0-SNAPSHOT.jar| [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.281 s -- in xyz.block.ftl.ContextTest
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] Results:
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [ERROR] Errors:
….0-SNAPSHOT.jar| [ERROR]   ExtractSchemaRuleTest.extracts schema:109 NoSuchMethod 'void xyz.block.ftl.v1.schema.Type.<init>(xyz.block.ftl.v1.schema.Int, xyz.block.ftl.v1.schema.Float, xyz.block.ftl.v1.schema.String, xyz.block.ftl.v1.schema.Bytes, xyz.block.ftl.v1.schema.Bool, xyz.block.ftl.v1.schema.Time, xyz.block.ftl.v1.schema.Array, xyz.block.ftl.v1.schema.Map, xyz.block.ftl.v1.schema.Any, xyz.block.ftl.v1.schema.Unit, xyz.block.ftl.v1.schema.DataRef, xyz.block.ftl.v1.schema.Optional, okio.ByteString, int, kotlin.jvm.internal.DefaultConstructorMarker)'
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [ERROR] Tests run: 9, Failures: 0, Errors: 1, Skipped: 0
….0-SNAPSHOT.jar| [INFO]
….0-SNAPSHOT.jar| [INFO] ------------------------------------------------------------------------
….0-SNAPSHOT.jar| [INFO] BUILD FAILURE
….0-SNAPSHOT.jar| [INFO] ------------------------------------------------------------------------
….0-SNAPSHOT.jar| [INFO] Total time:  4.927 s
….0-SNAPSHOT.jar| [INFO] Finished at: 2024-03-07T09:13:29-07:00
….0-SNAPSHOT.jar| [INFO] ------------------------------------------------------------------------
….0-SNAPSHOT.jar| [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project ftl-runtime:
….0-SNAPSHOT.jar| [ERROR]
….0-SNAPSHOT.jar| [ERROR] Please refer to /Users/wesbillman/dev/ftl/kotlin-runtime/ftl-runtime/target/surefire-reports for the individual test results.
….0-SNAPSHOT.jar| [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
….0-SNAPSHOT.jar| [ERROR] -> [Help 1]
….0-SNAPSHOT.jar| [ERROR]
….0-SNAPSHOT.jar| [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
….0-SNAPSHOT.jar| [ERROR] Re-run Maven using the -X switch to enable full debug logging.
….0-SNAPSHOT.jar| [ERROR]
….0-SNAPSHOT.jar| [ERROR] For more information about the errors and possible solutions, please read the following articles:
….0-SNAPSHOT.jar| [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
….0-SNAPSHOT.jar| Bitfile:115:11:   build:
                          ^
    error: build failed: build failed: build failed: failed to run command "mvn -B -N install\nmvn -B -pl :ftl-runtime install": exit status 1
@github-actions github-actions bot added the triage Issue needs triaging label Mar 7, 2024
@wesbillman wesbillman changed the title Maven build error requiring Maven build error requiring clean to build successfully Mar 7, 2024
@alecthomas alecthomas mentioned this issue Mar 7, 2024
@alecthomas
Copy link
Collaborator

If it's incremental compilation that's causing it, we should just disable it. But I think we need to know what's causing it first.

@alecthomas
Copy link
Collaborator

I encountered this today and disabling incremental compilation did indeed fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants