This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch TINKERPOP-3193 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 7a5aa758cfcdf8145c0e3360354365b8caae30fb Author: Cole-Greer <[email protected]> AuthorDate: Mon Sep 22 15:05:38 2025 -0700 docs --- CHANGELOG.asciidoc | 3 ++- docs/src/upgrade/release-3.8.x.asciidoc | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 26bf36c219..2ce7140f59 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -101,7 +101,8 @@ This release also includes changes from <<release-3-7-XXX, 3.7.XXX>>. * Updated which steps are able to accept arguments in grammar * Introduced `GValue` to represent parameterized values in a `GraphTraversal` * Added optional traversal cache to `GremlinLangScriptEngine` -* Introduced step interfaces for all parameterizable steps +* Introduced `StepContract` interfaces for all parameterizable steps +* Decoupled management of id, label, and properties from `Configuring` interface in `addV()`, `addE()` and `property()` * Removed auto-unfold of singleton collections from `range()`, `limit()`, and `tail()` local scope steps to improve consistency of output. * Renamed `MergeElementStep` to `MergeElementStep` as it is a base class to `mergeV()` and `mergeE()`. * Renamed `MergeStep` of `merge()` to `MergeElementStep` for consistency. diff --git a/docs/src/upgrade/release-3.8.x.asciidoc b/docs/src/upgrade/release-3.8.x.asciidoc index 297742f13a..d414462543 100644 --- a/docs/src/upgrade/release-3.8.x.asciidoc +++ b/docs/src/upgrade/release-3.8.x.asciidoc @@ -874,6 +874,41 @@ pinned variable is one which must remain bound to the current value. By paramete variable, as it can be substituted in the optimized traversal without any loss of meaning, however the variable "count" will be pinned as the optimized traversal is not valid for other values of "count". +===== Decouple internal step state from `Configuring`/`Parameterizing` interfaces + +Previously `AddVertexStep`, `AddVertexStartStep`, `AddEdgeStep`, `AddEdgeStartStep`, and `AddPropertyStep` stored their +internal state (id, label, properties, from/to vertices...) in a `Parameters` object which was exposed via the +`Configuring` and `Parameterizing` interfaces. These interfaces are primarily intended to support with()-modulation, and +thus these steps had weird unintended behaviors when combined with with()-modulation: + +[source,text] +---- +gremlin> g.addV().with("name", "cole").valueMap() +==>[name:[cole]] +---- + +This internal step state has now been decoupled from the `Configuring` and `Parameterizing` interfaces, which are now +exclusively used for the purposes of with()-modulation. All accesses of these steps internal data must now go through +methods defined in the new `StepContract` interfaces: `AddVertexStepContract`, `AddEdgeStepContract`, and +`AddPropertyStepContract`: + +[source,text] +---- +// Read label +Object label = addVertexStep.getParameters().getRaw().get(T.label).get(0) // 3.7.4 +Object label = addVertexStep.getLabel() // 3.8.0 + +// Set property +addVertexStep.configure("name", "cole") // 3.7.4 +addVertexStep.addProperty("name", "cole") // 3.8.0 + +// Get properties +Map<Object, List<Object>> properties = addVertexStep.getParameters.getRaw() // 3.7.4 +Map<Object, List<Object>> properties = addVertexStep.getProperties() // 3.8.0 +---- + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-3193[TINKERPOP-3193] + ==== Graph Driver Providers ===== Prefer OffsetDateTime
