-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add projects to test typescript support with different compiler options #4597
Add projects to test typescript support with different compiler options #4597
Conversation
613ff23
to
2d2b26c
Compare
Looks like the tests fail ? |
I fail to run the tests locally using maven. I haven't touch to java in a while so I'm a bit rusty at identifying compilation chain issues 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the failing tests, but not sure it satisfies the requirement to test against the built package (vs the source project)
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"antlr4": "file:../../../.." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we be using a local build rather than the source folder ?
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"antlr4": "file:../../../.." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we be using a local build rather than the source folder ?
I was hesitant to test against the build because that would require to compile every time you make a change, which is annoying during development. But I can make the change if you want. It is safer indeed. EDIT : your build process bundle the javascript, but do not include the type definitions. So we would have to use |
@ericvergnaud just pinging in case you didn't see my edit above |
Ah I see what you mean. But how can we be sure that your test samples are using the |
The test uses the package.json. The package.json references the EDIT : to clarify, |
@ericvergnaud after migrating the project using this lib to pnpm, I noticed the types stopped to work altogether. After looking around I noticed that the imports inside the definition files did not include the file extension, which is required for modern node usage. EDIT : for anyone following this topic, I've published a package that reflect the changes on this branch : https://www.npmjs.com/package/@cbjsdev/antlr4 . Install the latest version |
Hi, sorry for the delay. |
@ericvergnaud The need for the extension comes from the |
@JesusTheHun sorry but I don't follow:
What am I missing ? It seems the issue appears when introducing pnpm ? That's a separate topic altogether. (FWIW we are preparing a release, I'd like to get some of this in) |
@ericvergnaud When I mention
The intent of the PR is to make sure projects can import Antlr without issue, right ? Also, I'm on holidays without my machine. So I wont be able to revert the commit myself before August 5th. That being said, I'm curious about the reason for rejecting the commit. Ok it makes a lot of file changes, but they are trivial changes, it's not like they each require a review. |
The reason is that I'm in favor of small steps.
|
I understand the need for small steps.
I understand the commit touches a lot of files but the changes are tiny and identical in each file. |
@ericvergnaud I'll be back in a few days, can you hold the release until then ? |
@parrt not sure what is your ETA for the release ? |
Yes please rollback pnpm related changes |
I’m gonna try for this weekend maybe tomorrow
Dictation in use. Please excuse homophones, malapropisms, and nonsense.
…On Fri, Aug 2, 2024 at 12:03 AM Eric Vergnaud ***@***.***> wrote:
@parrt <https://github.com/parrt> not sure what is your ETA for the
release ?
—
Reply to this email directly, view it on GitHub
<#4597 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLUWIDCTL6R6UWDCNRVADZPMVLPAVCNFSM6AAAAABGLOZCY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRUG4YDOMBQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@JesusTheHun hi there, it's been a while... Any progress ? |
f7d2479
to
6b49b52
Compare
@JesusTheHun Thanks, this is looking good. The TS tests fail though. Could you take a look ? |
This looks unrelated to this PR, as a previous action failed the same way. See https://github.com/antlr/antlr4/actions/runs/10863756846/job/30148277515 |
@JesusTheHun Can you rebase ? |
Signed-off-by: Jonathan MASSUCHETTI <jonathan.massuchetti@dappit.fr>
Signed-off-by: Jonathan MASSUCHETTI <jonathan.massuchetti@dappit.fr>
…son "types" fields Signed-off-by: Jonathan MASSUCHETTI <jonathan.massuchetti@dappit.fr>
6b49b52
to
f131fa9
Compare
@ericvergnaud all clear ☝️ |
@parrt blessed |
Following #4218, this PR adds three test projects that use ESM and CJS with npm and one that uses ESM with pnpm.
The projects are compiled with different typescript compiler options to ensure compatibility.
This PR focuses on testing that antlr4 can be imported in TS projects. This is why it does not include non-TS test projects.