[jira] [Commented] (TINKERPOP-1791) GremlinDsl custom step with generic end type produces invalid code in __.java

2017-10-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16220295#comment-16220295
 ] 

ASF GitHub Bot commented on TINKERPOP-1791:
---

Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/736


> GremlinDsl custom step with generic end type produces invalid code in __.java
> -
>
> Key: TINKERPOP-1791
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1791
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.5
>Reporter: Severin Stampler
> Fix For: 3.2.7, 3.3.1
>
>
> I'm trying the create a custom step to perform a full-text search in an 
> external index and return the matching vertices or edges, like this:
> {code:java}
> @GremlinDsl(traversalSource = 
> "com.saillabs.mediaminer.mmgraphdsl.MMGraphTraversalSourceDsl")
> public interface MMGraphTraversalDsl extends GraphTraversal.Admin 
> {
>   public default GraphTraversal search(String field, String query) {
>   //TODO:
>   // Find vertex ids matching the search query in external index
>   
>   Set vids = new HashSet<>();
>   // for now add some hardcoded vertex ids
>   vids.add("vertex1");
>   vids.add("vertex2");
>   
> return hasId(P.within(vids));
> }
>   
> }
> {code}
> The code seems correct in my point of view, but the generated code in the 
> __.java is not compilable. It produces this error:
> {noformat}
> [ERROR] 
> /C:/svn/start/mm/mmserver/server/mvn/mmgraphdsl/target/generated-sources/annotations/com/saillabs/mediaminer/mmgraphdsl/__.java:[41,41]
>  cannot find symbol
> [ERROR] symbol:   class E
> [ERROR] location: class com.saillabs.mediaminer.mmgraphdsl.__
> {noformat}
> The generated code is this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think the correct generated code should look like this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think it's a bug in the GremlinDsl code generator, however, I may be wrong. 
> Any help is appreciated.
> Thanks, br
> Severin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TINKERPOP-1791) GremlinDsl custom step with generic end type produces invalid code in __.java

2017-10-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219764#comment-16219764
 ] 

ASF GitHub Bot commented on TINKERPOP-1791:
---

Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/736
  
VOTE +1


> GremlinDsl custom step with generic end type produces invalid code in __.java
> -
>
> Key: TINKERPOP-1791
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1791
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.5
>Reporter: Severin Stampler
>
> I'm trying the create a custom step to perform a full-text search in an 
> external index and return the matching vertices or edges, like this:
> {code:java}
> @GremlinDsl(traversalSource = 
> "com.saillabs.mediaminer.mmgraphdsl.MMGraphTraversalSourceDsl")
> public interface MMGraphTraversalDsl extends GraphTraversal.Admin 
> {
>   public default GraphTraversal search(String field, String query) {
>   //TODO:
>   // Find vertex ids matching the search query in external index
>   
>   Set vids = new HashSet<>();
>   // for now add some hardcoded vertex ids
>   vids.add("vertex1");
>   vids.add("vertex2");
>   
> return hasId(P.within(vids));
> }
>   
> }
> {code}
> The code seems correct in my point of view, but the generated code in the 
> __.java is not compilable. It produces this error:
> {noformat}
> [ERROR] 
> /C:/svn/start/mm/mmserver/server/mvn/mmgraphdsl/target/generated-sources/annotations/com/saillabs/mediaminer/mmgraphdsl/__.java:[41,41]
>  cannot find symbol
> [ERROR] symbol:   class E
> [ERROR] location: class com.saillabs.mediaminer.mmgraphdsl.__
> {noformat}
> The generated code is this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think the correct generated code should look like this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think it's a bug in the GremlinDsl code generator, however, I may be wrong. 
> Any help is appreciated.
> Thanks, br
> Severin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TINKERPOP-1791) GremlinDsl custom step with generic end type produces invalid code in __.java

2017-10-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16219605#comment-16219605
 ] 

ASF GitHub Bot commented on TINKERPOP-1791:
---

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/736
  
VOTE: +1


> GremlinDsl custom step with generic end type produces invalid code in __.java
> -
>
> Key: TINKERPOP-1791
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1791
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.5
>Reporter: Severin Stampler
>
> I'm trying the create a custom step to perform a full-text search in an 
> external index and return the matching vertices or edges, like this:
> {code:java}
> @GremlinDsl(traversalSource = 
> "com.saillabs.mediaminer.mmgraphdsl.MMGraphTraversalSourceDsl")
> public interface MMGraphTraversalDsl extends GraphTraversal.Admin 
> {
>   public default GraphTraversal search(String field, String query) {
>   //TODO:
>   // Find vertex ids matching the search query in external index
>   
>   Set vids = new HashSet<>();
>   // for now add some hardcoded vertex ids
>   vids.add("vertex1");
>   vids.add("vertex2");
>   
> return hasId(P.within(vids));
> }
>   
> }
> {code}
> The code seems correct in my point of view, but the generated code in the 
> __.java is not compilable. It produces this error:
> {noformat}
> [ERROR] 
> /C:/svn/start/mm/mmserver/server/mvn/mmgraphdsl/target/generated-sources/annotations/com/saillabs/mediaminer/mmgraphdsl/__.java:[41,41]
>  cannot find symbol
> [ERROR] symbol:   class E
> [ERROR] location: class com.saillabs.mediaminer.mmgraphdsl.__
> {noformat}
> The generated code is this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think the correct generated code should look like this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think it's a bug in the GremlinDsl code generator, however, I may be wrong. 
> Any help is appreciated.
> Thanks, br
> Severin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TINKERPOP-1791) GremlinDsl custom step with generic end type produces invalid code in __.java

2017-10-20 Thread stephen mallette (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16212618#comment-16212618
 ] 

stephen mallette commented on TINKERPOP-1791:
-

You can now define your method like this:

{code}
@GremlinDsl.AnonymousMethod(returnTypeParameters = {"A", "A"}, 
methodTypeParameters = {"A"})
public default GraphTraversal search(String field, String query) {
...
}
{code}

and it should compile properly as you can explicitly provide the appropriate 
type parameters rather than rely on the inference system.

> GremlinDsl custom step with generic end type produces invalid code in __.java
> -
>
> Key: TINKERPOP-1791
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1791
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.5
>Reporter: Severin Stampler
>
> I'm trying the create a custom step to perform a full-text search in an 
> external index and return the matching vertices or edges, like this:
> {code:java}
> @GremlinDsl(traversalSource = 
> "com.saillabs.mediaminer.mmgraphdsl.MMGraphTraversalSourceDsl")
> public interface MMGraphTraversalDsl extends GraphTraversal.Admin 
> {
>   public default GraphTraversal search(String field, String query) {
>   //TODO:
>   // Find vertex ids matching the search query in external index
>   
>   Set vids = new HashSet<>();
>   // for now add some hardcoded vertex ids
>   vids.add("vertex1");
>   vids.add("vertex2");
>   
> return hasId(P.within(vids));
> }
>   
> }
> {code}
> The code seems correct in my point of view, but the generated code in the 
> __.java is not compilable. It produces this error:
> {noformat}
> [ERROR] 
> /C:/svn/start/mm/mmserver/server/mvn/mmgraphdsl/target/generated-sources/annotations/com/saillabs/mediaminer/mmgraphdsl/__.java:[41,41]
>  cannot find symbol
> [ERROR] symbol:   class E
> [ERROR] location: class com.saillabs.mediaminer.mmgraphdsl.__
> {noformat}
> The generated code is this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think the correct generated code should look like this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think it's a bug in the GremlinDsl code generator, however, I may be wrong. 
> Any help is appreciated.
> Thanks, br
> Severin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TINKERPOP-1791) GremlinDsl custom step with generic end type produces invalid code in __.java

2017-10-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16212614#comment-16212614
 ] 

ASF GitHub Bot commented on TINKERPOP-1791:
---

GitHub user spmallette opened a pull request:

https://github.com/apache/tinkerpop/pull/736

TINKERPOP-1791 Added GremlinDsl.AnonymousMethod annotation

https://issues.apache.org/jira/browse/TINKERPOP-1791

Allows the ability to bypass the type inference system and provides for 
direct specification of the type parameters when generating anonymous methods.

Builds with `mvn clean install`

VOTE +1

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/tinkerpop TINKERPOP-1791

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/736.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #736


commit daa442cd7e100a7f48541cf17bc29b17c68cb5a5
Author: Stephen Mallette 
Date:   2017-10-20T12:58:52Z

TINKERPOP-1791 Added GremlinDsl.AnonymousMethod annotation

Allows the ability to bypass the type inference system and provides for 
direct specification of the type parameters when generating anonymous methods.




> GremlinDsl custom step with generic end type produces invalid code in __.java
> -
>
> Key: TINKERPOP-1791
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1791
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.5
>Reporter: Severin Stampler
>
> I'm trying the create a custom step to perform a full-text search in an 
> external index and return the matching vertices or edges, like this:
> {code:java}
> @GremlinDsl(traversalSource = 
> "com.saillabs.mediaminer.mmgraphdsl.MMGraphTraversalSourceDsl")
> public interface MMGraphTraversalDsl extends GraphTraversal.Admin 
> {
>   public default GraphTraversal search(String field, String query) {
>   //TODO:
>   // Find vertex ids matching the search query in external index
>   
>   Set vids = new HashSet<>();
>   // for now add some hardcoded vertex ids
>   vids.add("vertex1");
>   vids.add("vertex2");
>   
> return hasId(P.within(vids));
> }
>   
> }
> {code}
> The code seems correct in my point of view, but the generated code in the 
> __.java is not compilable. It produces this error:
> {noformat}
> [ERROR] 
> /C:/svn/start/mm/mmserver/server/mvn/mmgraphdsl/target/generated-sources/annotations/com/saillabs/mediaminer/mmgraphdsl/__.java:[41,41]
>  cannot find symbol
> [ERROR] symbol:   class E
> [ERROR] location: class com.saillabs.mediaminer.mmgraphdsl.__
> {noformat}
> The generated code is this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think the correct generated code should look like this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think it's a bug in the GremlinDsl code generator, however, I may be wrong. 
> Any help is appreciated.
> Thanks, br
> Severin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TINKERPOP-1791) GremlinDsl custom step with generic end type produces invalid code in __.java

2017-10-19 Thread stephen mallette (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16211912#comment-16211912
 ] 

stephen mallette commented on TINKERPOP-1791:
-

Took a quick stab at trying to fix this problem but a simple solution didn't 
present itself too well. Was hoping for an easy way to override the type 
parameters with some configuration options provided as annotations on the DSL 
method itself, but i'm not sure that's a good way to do it (plus it didn't 
quite work the way i wanted).Will need to re-think this a bit as I'm not seeing 
a fast easy fix.

> GremlinDsl custom step with generic end type produces invalid code in __.java
> -
>
> Key: TINKERPOP-1791
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1791
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.5
>Reporter: Severin Stampler
>
> I'm trying the create a custom step to perform a full-text search in an 
> external index and return the matching vertices or edges, like this:
> {code:java}
> @GremlinDsl(traversalSource = 
> "com.saillabs.mediaminer.mmgraphdsl.MMGraphTraversalSourceDsl")
> public interface MMGraphTraversalDsl extends GraphTraversal.Admin 
> {
>   public default GraphTraversal search(String field, String query) {
>   //TODO:
>   // Find vertex ids matching the search query in external index
>   
>   Set vids = new HashSet<>();
>   // for now add some hardcoded vertex ids
>   vids.add("vertex1");
>   vids.add("vertex2");
>   
> return hasId(P.within(vids));
> }
>   
> }
> {code}
> The code seems correct in my point of view, but the generated code in the 
> __.java is not compilable. It produces this error:
> {noformat}
> [ERROR] 
> /C:/svn/start/mm/mmserver/server/mvn/mmgraphdsl/target/generated-sources/annotations/com/saillabs/mediaminer/mmgraphdsl/__.java:[41,41]
>  cannot find symbol
> [ERROR] symbol:   class E
> [ERROR] location: class com.saillabs.mediaminer.mmgraphdsl.__
> {noformat}
> The generated code is this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think the correct generated code should look like this:
> {code:java}
> public static  MMGraphTraversal search(String field, String query) {
> return __.start().search(field,query);
>   }
> {code}
> I think it's a bug in the GremlinDsl code generator, however, I may be wrong. 
> Any help is appreciated.
> Thanks, br
> Severin



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)