Skip to content

TINKERPOP-2394 Unable to use __ class of a custom DSL when passing a script even if this class is imported#1305

Merged
spmallette merged 1 commit intoapache:masterfrom
mmadoo:TINKERPOP-2394
Aug 4, 2020
Merged

TINKERPOP-2394 Unable to use __ class of a custom DSL when passing a script even if this class is imported#1305
spmallette merged 1 commit intoapache:masterfrom
mmadoo:TINKERPOP-2394

Conversation

@mmadoo
Copy link
Copy Markdown
Contributor

@mmadoo mmadoo commented Jul 23, 2020

No description provided.

@spmallette
Copy link
Copy Markdown
Contributor

I suppose that this change makes it the responsibility of the user to validate that they don't override any of the Gremlin DSL with their imports. I think that's ok, but this could represent a breaking change to those who might rely on the ordering of the Customizer implementations as they are today. As such I'm not sure if this should land in 3.4.x - perhaps it is best saved for 3.5.0 on master.

@mmadoo mmadoo changed the base branch from 3.4-dev to master July 23, 2020 11:31
@spmallette
Copy link
Copy Markdown
Contributor

I was about to merge this when I wondered if the better solution was to simply rename the generated DSL class for anonymous traversals - couldn't we just rename it to something other than __? maybe it's simply ___ (i.e. 3 underscore instead of 2)? thoughts?

@mmadoo
Copy link
Copy Markdown
Contributor Author

mmadoo commented Aug 4, 2020

I think that renaming generated DSL class to ___ may be a breaking change higher than reordering imports.
There can also be some corner case where overwrite of other classes or constants may be needed (for instance, if I have a constant public static String id = "ID" for a specific customer requirement, I would like to be able to use it and use T.id to get element ID).

@spmallette
Copy link
Copy Markdown
Contributor

I think that renaming generated DSL class to ___ may be a breaking change higher than reordering imports.

sure and i was ok with that for 3.5.0.

There can also be some corner case where overwrite of other classes or constants may be needed (for instance, if I have a constant public static String id = "ID" for a specific customer requirement, I would like to be able to use it and use T.id to get element ID).

ok - maybe not letting Gremlin have the last word on what the imports are is ok. I will merge this as it is. thanks.

@spmallette spmallette merged commit 4a28117 into apache:master Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants