neo4j-contrib / neo4j-apoc-procedures

Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            
https://neo4j.com/labs/apoc
Apache License 2.0
1.72k stars 493 forks source link

Fix ApocSignatures.PROCEDURES not found in StartupExtendedTest due to Cypher25 introduction #4225

Open vga91 opened 1 week ago

vga91 commented 1 week ago

TODO: waiting for https://github.com/neo4j-contrib/neo4j-apoc-procedures/pull/4230 merge??

Fix the cannot find symbol CI error, see here

/home/runner/work/neo4j-apoc-procedures/neo4j-apoc-procedures/extended-it/src/test/java/apoc/neo4j/docker/StartupExtendedTest.java:119: error: cannot find symbol
        assertEquals(sorted(ApocSignatures.PROCEDURES), procedureNames);

The error is caused by the following changes in core,

which reflects apoc extended: https://github.com/neo4j-contrib/neo4j-apoc-procedures/pull/4208#discussion_r1816613431

Therefore, changed tests in a similar way as StartupCore test


If we don't change anything we have this error: https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/11777623730/job/32802388039?pr=4225#step:10:4819

If we put the procedure in extended.txt we have these 2 errors: https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/11778250428/job/32804296390?pr=4225

This because load.jsonParams currently is in both cypher5 core and cypher25 extended. So we have remove it manually (waiting for core removal).

vga91 commented 1 week ago

Fixing https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/11777623730/job/32802388039?pr=4225#step:10:4819

Fixing: https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/11778250428/job/32804296390?pr=4225

vga91 commented 5 days ago

Fixing https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/11888241762/job/33122404932?pr=4225#step:10:537

Increasing the java version will throw this error: https://github.com/neo4j-contrib/neo4j-apoc-procedures/actions/runs/11890926078/job/33130596999?pr=4225#step:10:161

      > No matching variant of project :common was found. The consumer was configured to find a library for use during compile-time, compatible with Java 17, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'apiElements' capability org.neo4j.procedure:common:5.26.0 declares a library for use during compile-time, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 21 and the consumer needed a component, compatible with Java 17
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')

EDIT: this error should be solved here: https://github.com/neo4j-contrib/neo4j-apoc-procedures/pull/4230?

vga91 commented 5 days ago

Try removing -SNAPSHOT since is not present in Core's build.gradle