Skip to content

Build failure on go 1.27 #62

Description

@scudette

Since go 1.27 the default json implementation has changed - this breaks any projects who use this project as a dependency:

# go.lsp.dev/protocol
../../go/pkg/mod/go.lsp.dev/protocol@v1.0.2-0.20260831102204-fd045959937f/codec_helpers.go:183:13: assignment mismatch: 2 variables but tok.Int returns 1 value
../../go/pkg/mod/go.lsp.dev/protocol@v1.0.2-0.20260831102204-fd045959937f/codec_helpers.go:209:13: assignment mismatch: 2 variables but tok.Uint returns 1 value

To test the new implementation on older go versions use the env GOEXPERIMENT=jsonv2 which is the default on go 1.27

To temporarily revert go's implementation set the env GOEXPERIMENT=nojsonv2 or use the build tag goexperiment.nojsonv2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions