Skip to content

[WIP]Typescript target - #3870

Closed
ericvergnaud wants to merge 182 commits into
antlr:devfrom
ericvergnaud:typescript-target
Closed

ericvergnaud wants to merge 182 commits into
antlr:devfrom
ericvergnaud:typescript-target

Conversation

@ericvergnaud

Copy link
Copy Markdown
Contributor

All ts tests pass locally.
Submitting a PR to ensure nothing else is broken, and try ts CI.
Also fixes #3868
tsc generates tons of warnings which I need to deal with

@ericvergnaud

Copy link
Copy Markdown
Contributor Author

mmm... not sure why my commits aren't signed

@ericvergnaud

ericvergnaud commented Sep 7, 2022 •

Copy link
Copy Markdown
Contributor Author

@parrt hey, here's a beta of the typescript target
Also fixes #3868
the CI works on Linux but needs to be fixed for Mac/Windows
beyond my own beta-testing, I think it would be great to bring in beta-testers, but that involves a 'sensitive' announcement so let me know what you think ?

@KvanTTT

KvanTTT commented Sep 7, 2022

Copy link
Copy Markdown
Member

mmm... not sure why my commits aren't signed

Every commit should have a sign, for example:

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>

Also, is it possible to squash most part of commits? Commits like

renamed for clarity
fix issues
progressing
...

are not useful for reviewers and git history since they are not informative.

@ericvergnaud

Copy link
Copy Markdown
Contributor Author

mmm... not sure why my commits aren't signed

Every commit should have a sign, for example:

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>

Also, is it possible to squash most part of commits? Commits like

renamed for clarity
fix issues
progressing
...

are not useful for reviewers and git history since they are not informative.

As written, I know what DCO expects, but I had automated this on my end, and it seems to no longer work..
This is WIP, so no need to review/squash yet.

Comment thread tool/src/org/antlr/v4/tool/Grammar.java Resolved
@KvanTTT

KvanTTT commented Sep 7, 2022

Copy link
Copy Markdown
Member

I had automated this on my end, and it seems to no longer work..

Looks like so because not every commit has a sign.

@ericvergnaud
ericvergnaud marked this pull request as draft September 8, 2022 16:05
hs-apotell and others added 21 commits September 9, 2022 17:09
When using variables to compare (like in if clause) the variable
shouldn't be quoted. More details can be found at the link below:

https://cmake.org/cmake/help/latest/command/if.html#variable-expansion

Signed-off-by: HS <hs@apotell.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: nicksxs <nicksxs@hotmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
@ericvergnaud

ericvergnaud commented Sep 12, 2022 •

Copy link
Copy Markdown
Contributor Author

@parrt thanks for merging #3878 (which was missing some tweaks, my bad), however I noticed you merged it into master rather than dev ? So I had to merge back from master which brings into this PR a few unrelated files, I guess they'll fade away once you merge master onto dev.
Runtime wise, as far as I'm concerned, this is ready to go.
However not sure about the API (the d.ts files) since we don't know what people need.
So my preferred path would be to publish a beta tool and js/ts runtime only, and call for testers. I expect these will come primarily from antlr4ts, so hopefully they will have mature requirements. I'll also be doing my own testing, but that may take a while since it requires migrating my code from js to ts. I expect the beta to last 2-3 months. Let me know what you think.

@ericvergnaud

ericvergnaud commented Sep 13, 2022 via email

Copy link
Copy Markdown
Contributor Author

@parrt

parrt commented Sep 16, 2022

Copy link
Copy Markdown
Member

beta

Well, sounds reasonable to me but I need to evaluate the merits of either approach discussed in #3867

What's involved in creating a suitable beta? A zip? A branch?

@ericvergnaud

ericvergnaud commented Sep 16, 2022 via email •

Copy link
Copy Markdown
Contributor Author

@jonaskello

Copy link
Copy Markdown

I was going to propose an issue to make the javascript target work better in typescript (exporting context classes so we can import them as typescript types). However having an official typescript target is of course a lot better :-). Just to know which way I should proceed I wanted to check if this PR will have a chance of getting merged in the foreseeable future or if it is more of an experiment?

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.