This is a great idea and I would be interested in testing things out/helping as I can.
> 1. would existing javascript users of the library experience any sort of break in their code as a result of this change? Some types for gremlin are available from DefinitelyTyped https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gremlin which can be installed via `npm install -D @types/gremlin. Build time or lint errors may occur for existing users depending on how different the types are between what is available today vs what would be bundled with the package > 3. on multiple occasions there have been people who have tried to make gremlin-javascript work in the browser - they never fully followed through but i imagine someone will wish to see that through. would a move to typescript preclude that from happening in any way? The build process would need to compile and publish the Javascript files to be consumed by node or the browser. Gremlint ( https://github.com/apache/tinkerpop/tree/master/gremlint) is built in typescript, I'm sure most of the project setup/release scripts could be copied over from there On Thu, Jan 5, 2023 at 6:15 AM Stephen Mallette <spmalle...@gmail.com> wrote: > thanks for offering to work on this. the only parts auto-generated now are > tests which produce this file: > > > https://github.com/apache/tinkerpop/blob/master/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js > > the script that does that is: > > > https://github.com/apache/tinkerpop/blob/master/gremlin-javascript/build/generate.groovy > > I have a few questions as I'm not familiar with typescript that much: > > 1. would existing javascript users of the library experience any sort of > break in their code as a result of this change? > 2. our entire project,even non-JVM based ones build by way of Maven. You > can see where we do that here[1]. The commands embedded in that XML file I > assume look familiar to you. can you say what would change in our build as > a result of going to typescript? > 3. on multiple occasions there have been people who have tried to make > gremlin-javascript work in the browser - they never fully followed through > but i imagine someone will wish to see that through. would a move to > typescript preclude that from happening in any way? > > > > > > > [1] > > https://github.com/apache/tinkerpop/blob/master/gremlin-javascript/pom.xml#L139-L188 > > > > On Tue, Jan 3, 2023 at 6:34 PM Simon Gaufreteau < > simon.gaufret...@gmail.com> > wrote: > > > Hello everyone, > > > > I've been using gremlin for a few months in Typescript and I would like > to > > start contributing to the project. > > From a user perspective, getting started with gremlin in Ts isn't the > best, > > there were multiple times when I had to look up the javadoc to understand > > what was going on. > > From a developer perspective, I feel like javascript is prone to type > > errors and the devs could save a lot of time in the future if the project > > keeps growing. > > There are of course a few downsides like compilation time or additional > > complexity in some cases, but since the initial codebase is in Java I > don't > > think these are very important. > > > > Based on this, I suggest a translation of gremlin-javascript to > Typescript, > > which was suggested in the past in this ticket : > > https://issues.apache.org/jira/browse/TINKERPOP-2027. Since I've used > > gremlin with Typescript and I have overall Typescript experience, I would > > like to work on this if you think it's feasible. > > > > From what I understood, some parts of the library are auto-generated by > > groovy scripts and some are manually written but it looks like this > changed > > quite a bit from version 3.4 (version at the time of the initial ticket). > > I could use a little guidance on what is and what is not generated from > the > > Java code, could someone give a bit of details / link to the scripts that > > handle this ? I will deep dive on this later but help is always > > appreciated. > > > > Any thoughts on this task ? / Anything I should know or consider before I > > get started ? > > > > Regards, > > Simon > > >