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

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

Cole-Greer commented on code in PR #3816:
URL: https://github.com/apache/tinkerpop/pull/3816#discussion_r4604431425


##########
gremlin-go/driver/customTypeWriter_example_test.go:
##########
@@ -0,0 +1,49 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// An external test package, so the example compiles only against the exported 
API.
+package gremlingo_test
+
+import (
+       "bytes"
+       "reflect"
+
+       gremlingo "github.com/apache/tinkerpop/gremlin-go/v3/driver"
+)
+
+// Point is an example provider-specific type.
+type Point struct {
+       Name string
+       X, Y int32
+}
+
+func ExampleRegisterCustomTypeWriter() {

Review Comment:
   I don't want to advocate against extra testing, however I also dislike the 
proliferation of small special purpose test classes. I understand that the only 
way to test public access to the API is if the test class is itself outside of 
the gremlingo package, but I'm not sure this problem is big enough to warrant a 
dedicated test class.
   
   Now that this is resolved, I think it's quite unlikely that a future change 
would unintentionally remove part of the public API. I think the risk of 
regression is quite low and I'm not sure a special purpose test class is 
justified.
   
   Thoughts?





> CustomTypeWriter API references unexported type
> -----------------------------------------------
>
>                 Key: TINKERPOP-3305
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3305
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: go
>    Affects Versions: 3.8.2
>            Reporter: Ken Hu
>            Priority: Blocker
>
> The {{CustomTypeWriter}} in gremlin-go 
> https://github.com/apache/tinkerpop/blob/b82624473beaa0c36b1b0e38e77f18b300b3422e/gremlin-go/driver/serializer.go#L50
>  uses *graphBinaryTypeSerializer which isn't exported.
> Also noticed this isn't in {{master}} branch so confirm if that is correct 
> when merging up from {{3.8-dev}}.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to