antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
16.99k stars 3.26k forks source link

github.com/antlr/antlr4/runtime/Go/antlr is not properly deprecated #4246

Open goto1134 opened 1 year ago

goto1134 commented 1 year ago

The Golang package github.com/antlr/antlr4/runtime/Go/antlr is marked deprecated in the source code, but since this change was never published, the proxies don't mark the version as deprecated.

Here is an example of a properly deprecated package. As you can see, the json output contains the Deprecated key with a deprecation message.

$ go list -m -json -u -retracted -mod=readonly github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys@v0.10.0
{
    "Path": "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys",
    "Version": "v0.10.0",
    "Time": "2023-04-13T20:18:35Z",
    "GoMod": "/Users/goto1134/go/pkg/mod/cache/download/github.com/!azure/azure-sdk-for-go/sdk/keyvault/azkeys/@v/v0.10.0.mod",
    "GoVersion": "1.18",
    "Deprecated": "use github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys instead",
    "Origin": {
        "VCS": "git",
        "URL": "https://github.com/Azure/azure-sdk-for-go",
        "Subdir": "sdk/keyvault/azkeys",
        "Ref": "refs/tags/sdk/keyvault/azkeys/v0.10.0",
        "Hash": "e9e6b6281766a4e71ea0ee0b7268692009e2794b"
    }
}

And here is an example of retrieving the same information for antlr package. As you can see, there is no Deprecated key.

$ go list -m -json -u -retracted -mod=readonly github.com/antlr/antlr4/runtime/Go/antlr@v1.4.10
{
    "Path": "github.com/antlr/antlr4/runtime/Go/antlr",
    "Version": "v1.4.10",
    "Time": "2022-08-26T21:36:29Z",
    "Dir": "/Users/goto1134/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/antlr@v1.4.10",
    "GoMod": "/Users/goto1134/go/pkg/mod/cache/download/github.com/antlr/antlr4/runtime/!go/antlr/@v/v1.4.10.mod",
    "GoVersion": "1.16",
    "Origin": {
        "VCS": "git",
        "URL": "https://github.com/antlr/antlr4",
        "Subdir": "runtime/Go/antlr",
        "Ref": "refs/tags/runtime/Go/antlr/v1.4.10",
        "Hash": "cd8f367ca010eb59defadf3df622793bc3a8afe2"
    }
}

This might be misleading since golsp and IntelliJ go plugin rely on this data to show warnings to users. Please, provide a new release with the added deprecation comment.

jimidle commented 1 year ago

It is part of the problem of the runtime being embedded down there. The next release will use it's own release repo and this issue will disappear. It will require a different go get package but then the versioning will work correctly and the v4 code will be at the root, but still referenced as v4, as per normal go modules.

I am aware of the issue, but there is no resolution as the repo stands as go get etc just cannot deal with the location of the source code. Believe me, I have tried everything.

On Wed, Apr 26, 2023 at 12:01 AM Andrei Efanov @.***> wrote:

The package github.com/antlr/antlr4/runtime/Go/antlr is marked deprecated in the source code, but since this change was never published, the proxies don't mark the version as deprecated.

Here is an example of a properly deprecated package. As you can see, the json output contains the Deprecated key with a deprecation message.

$ go list -m -json -u -retracted -mod=readonly @. { "Path": "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys", "Version": "v0.10.0", "Time": "2023-04-13T20:18:35Z", "GoMod": @./v0.10.0.mod", "GoVersion": "1.18", "Deprecated": "use github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys instead", "Origin": { "VCS": "git", "URL": "https://github.com/Azure/azure-sdk-for-go", "Subdir": "sdk/keyvault/azkeys", "Ref": "refs/tags/sdk/keyvault/azkeys/v0.10.0", "Hash": "e9e6b6281766a4e71ea0ee0b7268692009e2794b" } }

And here is an example of retrieving the same information for antlr package. As you can see, there is no Deprecated key.

$ go list -m -json -u -retracted -mod=readonly @. { "Path": "github.com/antlr/antlr4/runtime/Go/antlr", "Version": "v1.4.10", "Time": "2022-08-26T21:36:29Z", "Dir": @.", "GoMod": @.***/v1.4.10.mod", "GoVersion": "1.16", "Origin": { "VCS": "git", "URL": "https://github.com/antlr/antlr4", "Subdir": "runtime/Go/antlr", "Ref": "refs/tags/runtime/Go/antlr/v1.4.10", "Hash": "cd8f367ca010eb59defadf3df622793bc3a8afe2" } }

This might be misleading since golsp and IntelliJ go plugin rely on this data to show warnings to users. Please, provide a new release with the added deprecation comment.

— Reply to this email directly, view it on GitHub https://github.com/antlr/antlr4/issues/4246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ7TMF3TEIA6SUQKSRBTYLXC7YOXANCNFSM6AAAAAAXLG22DU . You are receiving this because you are subscribed to this thread.Message ID: @.***>