You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by mi...@apache.org on 2022/03/18 13:59:04 UTC

[tinkerpop] branch master updated: Updating Intellij developer docs.

This is an automated email from the ASF dual-hosted git repository.

mikepersonick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f9dfa2  Updating Intellij developer docs.
1f9dfa2 is described below

commit 1f9dfa205f2f473452d62a57b2516e192080b7d9
Author: mikepersonick <mi...@supersonick.io>
AuthorDate: Thu Mar 17 09:01:27 2022 -0600

    Updating Intellij developer docs.
---
 .../dev/developer/development-environment.asciidoc | 33 ++++++++++------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc
index ab4b911..7f0b946 100644
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@ -536,24 +536,9 @@ Projects" side panel, right click the `gremlin-shaded` module and select "Ignore
 
 Note that it may be necessary to re-execute these steps if the `gremlin-shaded` `pom.xml` is ever updated.
 
-Developers working on the `neo4j-gremlin` module should enabled the `include-neo4j` Maven profile in Intellij.
-This will ensure that tests will properly execute within the IDE.
-
-If Intellij complains about "duplicate sources" for the Groovy files when attempting to compile/run tests, then
-install the link:http://plugins.jetbrains.com/plugin/7442?pr=idea[GMavenPlus Intellij plugin].
-
-The `gremlin-core` module uses a Java annotation processor to help support DSLs. To support this capability be sure
-that:
-
-. `File | Settings | Compiler | Annotation Processors` has the checkbox with the "Enable annotation processing" checked.
-Intellij should be able to detect the processor automatically on build.
-. The `gremlin-core/target` directory should not be hidden and `target/classes`, `target/generated-sources` and
-`target/generated-test-sources` should be marked as "Generated Sources Root". If they are not setup that way by
-Intellij by default then simply right-click on them use the "Mark Directory with" option to make the appropriate
-selections.
-
-The `gremlin-grammar` module requires ANTLR processing. While this processing is configured to execute with Maven, it
-can also be setup to generate parser files within Intellij itself on command:
+You will initially see lots of errors related to the Gremlin lexer/parser. The `gremlin-grammar` module requires
+ANTLR processing. While this processing is configured to execute with Maven, it can also be setup to generate parser
+files within Intellij itself on command:
 
 . Install the ANTLR4 Grammar Plugin for Intellij
 . Right-click on the `Gremlin.g4` file and "Configure ANTLR"
@@ -568,6 +553,18 @@ With these settings it should be possible to right-click `Gremlin.g4` and "Gener
 the generated code in where specified at `target/generated-sources/antlr4`. Be sure to right-click the `antlr4`
 directory and "Mark directory as" "Generated Sources Root" which should allow Intellij to recognize it.
 
+The `gremlin-groovy` module uses a Java annotation processor to help support DSLs. Annotation processing in Intellij
+should be set up by the Maven import, but if this is set up incorrectly you will see a cryptic error message when
+building: `java: Compilation failed: internal java compiler error`. To fix this, search for the Intellij setting
+`Annotation Processors`. Make sure that annotation processing is enabled for `gremlin-groovy` but disabled for
+`gremlin-annotations`. This should fix the internal java compile error. Next you may see compile errors complaining
+that the `jsr223` classes `__`, ``CredentialTraversal`, `CredentialTraversalSource`, and `DefaultCredentialTraversal`
+cannot be found. Those classes are generated by annotations. To fix these errors, make sure mark the
+directory `gremlin-groovy/target/generated-sources/annotations` as "Generated Sources Root".
+
+Developers working on the `neo4j-gremlin` module should enabled the `include-neo4j` Maven profile in Intellij.
+This will ensure that tests will properly execute within the IDE.
+
 === Debugging
 
 It is generally assumed that JVM-based debugging of TinkerPop code in Intellij is a relatively straightforward task