-
Notifications
You must be signed in to change notification settings - Fork 28
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
[TOQo1n9M] Core part - apoc-hadoop dependency is conflicting 5.x (neo4j-contrib/neo4j-apoc-procedures#3450) #347
Conversation
569971c
to
6c20011
Compare
6c20011
to
8d4740b
Compare
@Lojjs I know it's a cherry pick of a pr you already approved, Do you (or someone else) want to take a look here as well, by any chance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of concerns, not sure if my ideas work though
// create and delete a file to retrieve the current project (`core` or `extended`) | ||
FileObject resource = filer.createResource(StandardLocation.SOURCE_OUTPUT, "", "tmp", (Element[]) null); | ||
String projectPath = resource.getName(); | ||
resource.delete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feel a bit over complicated to me. Cannot we not e.g. send in a boolean to the write method depending on if we call it from core or extended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed with a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was more thinking about if we could avoid creating a temporary file, but looking closer I think it might not be so easy to do it in a smarter way. With your change it is at least a bit cleaner :)
@@ -75,8 +75,8 @@ public void compare_with_sources() { | |||
.list(record -> record.get("name").asString()); | |||
|
|||
|
|||
assertEquals(sorted(ApocSignatures.PROCEDURES), procedureNames); | |||
assertEquals(sorted(ApocSignatures.FUNCTIONS), functionNames); | |||
assertEquals(sorted(ApocSignaturesCore.PROCEDURES), procedureNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a brief look at your extended PR too. How come we test both core and extended in extended PR? I would (maybe naively) have thought that it would make more sense to have the checkCoreWithExtraDependenciesJars test here and the other 2 tests in the extended repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong, but I don't think it's possible to test core and extra-dependencies
here,
because we have to build the latter directly in extended
,
I think it's not possible to build them from core
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. I don't think I actually have tried to build them myself, so you might be right about that. If it was a conscious decision, I think it is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With your new changes, I think this is good enough
…4j-contrib/neo4j-apoc-procedures#3450) (#347) * [TOQo1n9M] Core part - apoc-hadoop dependency is conflicting 5.x (neo4j-contrib/neo4j-apoc-procedures#3450) * [TOQo1n9M] changed getProjectPath() to isExtendedProject()
Cherry-pick (core part) of neo4j-contrib/neo4j-apoc-procedures#3450
Extended part: neo4j-contrib/neo4j-apoc-procedures#3454.
apoc.ApocSignatures
which collect the list of procedures and functions,one for core and one for extended, so I added a
String projectPath
in order to create 2 different classes (ApocSignaturesCore
andApocSignaturesExtended
).copyFilesToPlugin(..)
to be reused in Extended