ArcadeData / arcadedb

ArcadeDB Multi-Model Database, one DBMS that supports SQL, Cypher, Gremlin, HTTP/JSON, MongoDB and Redis. ArcadeDB is a conceptual fork of OrientDB, the first Multi-Model DBMS. ArcadeDB supports Vector Embeddings.
https://arcadedb.com
Apache License 2.0
505 stars 63 forks source link

engine build fails #271

Closed grimace closed 2 years ago

grimace commented 2 years ago

ArcadeDB Version: 22.1.1-SNAPSHOT

JDK Version: 14.x

OS: OS/X

Expected behavior

engine build success

Actual behavior

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project arcadedb-engine: Compilation failure: Compilation failure: 
[ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/Bucket.java:[82,33] reference to Record is ambiguous
[ERROR]   both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match
[ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/Bucket.java:[87,34] reference to Record is ambiguous
[ERROR]   both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match
[ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/Bucket.java:[211,19] reference to Record is ambiguous
[ERROR]   both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match
[ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/Bucket.java:[474,42] reference to Record is ambiguous
[ERROR]   both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match
[ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/Bucket.java:[557,46] reference to Record is ambiguous
[ERROR]   both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match
[ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/database/async/DatabaseAsyncExecutorImpl.java:[371,34] reference to Record is ambiguous
[ERROR]   both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match

Steps to reproduce

do a pull on main/trunk run: ./mvnw -DskipTests=true clean install

lvca commented 2 years ago

It must be something related to Java14+ because on Java11 our GitHub Action pipeline compiles. Checking on it...

grimace commented 2 years ago

This may have been my problem. My maven was using java v14 -- issue on OSX, 14 has a 'java.lang.Record' which was causing a conflict with com.arcadedb.database.Record. ...though it was working up until yesterdays pull. I can build using java v11

lvca commented 2 years ago

I think the cause was a massive commit by @arcade-player a few days ago. I'll look into it.

lvca commented 2 years ago

I pushed a fix to the main branch. Basically, I'm importing ArcadeDB's Record interface as the first thing to assure there are no conflicts.

grimace commented 2 years ago

I'm still seeing some: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project arcadedb-engine: Compilation failure: Compilation failure: [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/serializer/BinarySerializer.java:[45,58] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/database/async/DatabaseAsyncExecutor.java:[72,21] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/BucketIterator.java:[29,49] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/BucketIterator.java:[37,3] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/engine/BucketIterator.java:[137,10] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/schema/EmbeddedSchema.java:[306,23] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/graph/ImmutableVertex.java:[55,11] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/engine/src/main/java/com/arcadedb/graph/ImmutableEdge.java:[55,11] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] -> [Help 1] [ERROR]

lvca commented 2 years ago

Or, installed the latest Java17 and fixed all the compilation issues. Now it should be good.

grimace commented 2 years ago

I'm still seeing a couple of build errors:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project arcadedb-server: Compilation failure: Compilation failure: [ERROR] /projects/arcadedb/server/src/test/java/com/arcadedb/server/ha/ReplicationServerIT.java:[198,11] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/server/src/test/java/com/arcadedb/server/security/ServerProfilingIT.java:[348,27] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match [ERROR] /projects/arcadedb/server/src/test/java/com/arcadedb/server/security/ServerProfilingIT.java:[402,29] reference to Record is ambiguous [ERROR] both interface com.arcadedb.database.Record in com.arcadedb.database and class java.lang.Record in java.lang match

lvca commented 2 years ago

@grimace thanks, fixed.

grimace commented 2 years ago

Thank you!

lvca commented 2 years ago

@grimace is everything smooth now with Java14?

grimace commented 2 years ago

yes, 14 and 17 as well. Thanks!

lvca commented 2 years ago

Great, thanks for the feedback.