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

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

Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/772
  
    > My concern is that people may still override/implement the old method and 
not the new one, thus yielding programs that don't execute properly
    
    Hmm....as I look at the way it is now, you mention a valid concern. This 
change effectively breaks existing `VertexProgram` implementations, doesn't it? 
Meaning, nothing in TinkerPop calls the deprecated method anymore, so existing 
`VertexProgram` implementations will no longer have the old method called at 
runtime - it will call the empty default method instead here:
    
    
https://github.com/apache/tinkerpop/pull/772/files#diff-ca108f45ec7b5a288dfce8019f1a6813L72
    
    Perhaps the right way to do this is to:
    
    1. Make the new method call the deprecated one by default. In that way, 
existing `VertexProgram` implementations just work on upgrade. Leave the 
deprecated one empty.
    2. Our `VertexProgram` implementations implement the new method, so they 
will all work without a problem. The old deprecated method should be 
implemented on these classes to call the new method. This way, if someone (for 
some weird reason) is relying on the behavior of the old method it will still 
work without change (you would need to add appropriate deprecation 
annotation/javadoc here.
    3. People who write new `VertexProgram` implementations wouldn't bother 
with the old deprecated method - perhaps some stronger language in the javadoc 
would make that clear to them.
    3. Write [upgrade 
docs](https://github.com/apache/tinkerpop/blob/tp32/docs/src/upgrade/release-3.2.x-incubating.asciidoc)
 to describe the new expectations around `VertexProgram` implementations and 
include a changelog entry - i can do that if you like on merge.
    
    How does that sound? 
    
    btw, sorry - this is turning into a complicated PR - thanks for continuing 
to work through this with us.



> VertexProgram create with varargs for Graphs
> --------------------------------------------
>
>                 Key: TINKERPOP-1861
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1861
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.7
>            Reporter: Philip Graff
>            Priority: Minor
>
> VertexProgram.Builder.create(Graph) can be modified to 
> VertexProgram.Builder.create(Graph...) so that passing in zero or many graphs 
> is naturally handled. The current state of passing in null when no graph is 
> needed is bad practice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to