Skip to content

Conversation

@Tiscs
Copy link

@Tiscs Tiscs commented Sep 1, 2024

Upgrade to go 1.21 to use slices package instead of golang.org/x/exp/slices package.

In the antlr4-go/antlr project, the go version declared in go.mod is already 1.22.

@jimidle
Copy link
Collaborator

jimidle commented Oct 11, 2024 via email

@skitt
Copy link

skitt commented Oct 11, 2024

I have already done this. It does not need a pr

It’s just confusing because it’s done in https://github.com/antlr4-go/antlr but not in https://github.com/antlr/antlr4/tree/dev/runtime/Go/antlr/v4 and the former says it’s a copy of the latter.

@jimidle
Copy link
Collaborator

jimidle commented Oct 11, 2024 via email

@skitt
Copy link

skitt commented Oct 11, 2024

Yes, but it referee to the build and release. You only use tagged versions

OK, sorry for the noise.

@Tiscs
Copy link
Author

Tiscs commented Oct 11, 2024

I have already done this. It does not need a pr

It’s just confusing because it’s done in https://github.com/antlr4-go/antlr but not in https://github.com/antlr/antlr4/tree/dev/runtime/Go/antlr/v4 and the former says it’s a copy of the latter.

I have previously created a PR in the antlr4-go/antlr project. but as mentioned in the project README.md, Do not submit PRs or any change requests to this repo, I closed that PR.

@Juneezee
Copy link

I have already done this. It does not need a pr

@jimidle But golang.org/x/exp is still in use in the https://github.com/antlr4-go/antlr repository as of today. Did I miss anything?

2025-01-19_01-13

@lschmierer
Copy link

I am confused, because the latest commit in https://github.com/antlr4-go/antlr is from May 2024 and does not contain this change.
@jimidle can you clarify and maybe merge this?
Thank you very much for your work!

(Reason is that I really want to drop the x/exp dependency in our project https://github.com/DAMEDIC/fhir-toolbox-go/blob/main/go.mod)

@xrstf
Copy link

xrstf commented Sep 18, 2025

I am also confused. The old exp module is still used both in this repo and in https://github.com/antlr4-go/antlr (even in the dev branch).

@skitt
Copy link

skitt commented Sep 18, 2025

@jimidle your changes seem to have been lost, I’m guessing they were deleted when https://github.com/antlr4-go/antlr was updated from this repository — I can’t find your equivalent changes any more. In any case, all the available releases of github.com/antlr4-go/antlr still use the x/exp slices package. Would it be possible to merge this PR to clean up the dependency?

@Tiscs
Copy link
Author

Tiscs commented Sep 18, 2025

I previously created a fork to address this issue by using the replace directive in go.mod to eliminate the dependency on golang.org/x/exp/slices. Here's a minimal example:

// git clone https://github.com/choral-io/antlr4-go.git ../antlr4-go

module github.com/choral-io/gommerce-server-core

go 1.25.0

replace github.com/antlr4-go/antlr/v4 v4.13.1 => ../antlr4-go

require (
    github.com/antlr4-go/antlr/v4 v4.13.1
    // other dependencies...
)

This workaround worked well in our project, but I sincerely hope the official repository can resolve this cleanly.

@jimidle
Copy link
Collaborator

jimidle commented Sep 19, 2025 via email

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.

7 participants