Skip to content

feat!: remove easyjson from go-server-sdk-evaluation#51

Merged
aaron-zeisler merged 3 commits into
v4from
aaronz/SDK-2118/remove-easyjson
May 29, 2026
Merged

feat!: remove easyjson from go-server-sdk-evaluation#51
aaron-zeisler merged 3 commits into
v4from
aaronz/SDK-2118/remove-easyjson

Conversation

@aaron-zeisler
Copy link
Copy Markdown

@aaron-zeisler aaron-zeisler commented Apr 29, 2026

Summary

This is the v4 major-version bump for go-server-sdk-evaluation. Two commits:

  1. chore: remove easyjson implementation — drops the optional easyjson backend in ldmodel, bumps go-jsonstream and go-sdk-common to development pseudo-versions that have their own easyjson removal merged, and raises the minimum supported Go version from 1.18 → 1.25 to match the lint behavior introduced when the dep updates pulled in generic-aware code paths.
  2. feat!: bump module path to v4 — bumps the module path /v3/v4, rewrites all internal imports, bumps both upstream libs from /v3 to /v4 at their new v4 dev pseudo-versions, updates release-please-manifest.json to 4.0.0. Workflow file changes for v4 land separately in #53.

SDK-2119: EasyJSON Removal — Dependency Chain (v4 strategy)

go-jsonstream/v4 (#39)                    <- feat!:
└─ go-sdk-common/v4 (#50)                 <- feat!:
   ├─ go-server-sdk-evaluation/v4 (this)  <- feat!:
   ├─ go-sdk-events/v3 (#43)              <- chore:
   └─ go-server-sdk/v7 (#380)             <- chore:
      └─ ld-relay (#666)                  <- chore:
         └─ internal services (6 PRs)     <- chore:

Stage layout

Stage Purpose PRs
1 Configure v4 branch's CI workflows #40, #52, #53
3 v4 major bumps + EasyJSON removal (libraries) #39, #50, #51
4 Cascade /v3 → /v4 through 10 downstream PRs (dev pseudo-versions) #43, #380, #666, #8924, 6 services

Context

Part of SDK-2113 (epic). Tracks SDK-2118. Third PR in the dep-chain stack — pins both upstream libs at their v4 dev pseudo-versions; is itself a dep of go-server-sdk.

Test plan

  • go test ./... passes (v4 module path)
  • go build ./... clean
  • go mod graph | grep easyjson returns empty
  • grep -r mailru/easyjson . returns no source hits

via LD Research 🤖


Note

Medium Risk
Breaking import path and minimum Go version for all consumers; evaluation logic is largely unchanged aside from dependency and build-path removal.

Overview
This PR releases go-server-sdk-evaluation v4 as a breaking major bump: the module path moves from /v3 to /v4, and all imports are updated to go-sdk-common/v4 and go-jsonstream/v4 (v4.0.0).

The optional easyjson integration is removed end-to-end: build-tagged MarshalEasyJSON/UnmarshalEasyJSON files are deleted, mailru/easyjson is dropped from go.mod, and Makefile/CI no longer run separate easyjson build, test, or benchmark jobs. JSON for flags/segments continues via go-jsonstream and standard encoding/json paths only.

Tooling and support matrix change with the release: Go 1.24 is set in go.mod, CI minimum Go is raised to 1.24, coverage enforcer targets the v4 package, and README badges/docs point at the v4 branch and pkg.go.dev path. A few nolint:gosec comments on range-variable addresses are removed without behavior changes.

Reviewed by Cursor Bugbot for commit 9ca10c6. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread ldmodel/parse_time.go
}
n := 0
for i := 0; i < max; i++ {
for i := 0; i < maxLen; i++ {
Copy link
Copy Markdown
Author

@aaron-zeisler aaron-zeisler May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were made because the version of Go (in go.mod) was upgraded from 1.18 to 1.24. Sometime in that version gap, max was introduced as a built-in keyword.

Comment thread evaluator.go
// Note that rule is passed by reference only for efficiency; we do not modify it
for _, clause := range rule.Clauses {
match, err := es.clauseMatchesContext(&clause, stack) //nolint:gosec // see comments at top of file
match, err := es.clauseMatchesContext(&clause, stack)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These gosec changes were made because the version of Go (in go.mod) was upgraded from 1.18 to 1.24. Sometime in that version gap, gosec no longer flags using the variable's address.

@aaron-zeisler aaron-zeisler force-pushed the aaronz/SDK-2118/remove-easyjson branch from 8572562 to f16d37c Compare May 26, 2026 22:55
@aaron-zeisler aaron-zeisler changed the base branch from v3 to v4 May 26, 2026 22:55
@aaron-zeisler aaron-zeisler changed the title chore: remove easyjson from go-server-sdk-evaluation feat!: remove easyjson from go-server-sdk-evaluation May 26, 2026
Drops the optional easyjson backend and its build-tag gate. The stdlib
encoding/json implementation is now the only path. The
launchdarkly_easyjson build tag becomes a silent no-op for any consumer
that still sets it.

Bumps go-jsonstream and go-sdk-common to development pseudo-versions
that have their own easyjson removal merged, dropping the easyjson
indirect dependency from this module's transitive graph as well.

Also raises the minimum supported Go version from 1.18 -> 1.25 to
match the lint behavior introduced when the dep updates pulled in
generic-aware code paths (the original lint failures surfaced after
the go-jsonstream/go-sdk-common dev-version bumps; floor change is
the simplest fix).

Squashed from four earlier commits on this branch (the original
removal, the upstream-dep dev-version bump, a no-op merge from v3 that
pulled in the release-please-action v4->v5 upgrade — already on v4 —
and the lint-floor fix).

Part of the SDK-2113 EasyJSON removal project.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aaron-zeisler aaron-zeisler force-pushed the aaronz/SDK-2118/remove-easyjson branch from f16d37c to 03e0ff3 Compare May 28, 2026 17:15
@aaron-zeisler aaron-zeisler marked this pull request as ready for review May 28, 2026 17:19
@aaron-zeisler aaron-zeisler requested a review from a team as a code owner May 28, 2026 17:19
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 03e0ff3. Configure here.

Comment thread Makefile
"packages" : {
"." : {
"release-type" : "go",
"bump-minor-pre-major" : true,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Claude:

"bump-minor-pre-major": true is a guard rail for stable branches — it tells release-please to treat feat!: (breaking change) commits as minor bumps, preventing an accidental jump from e.g. v3.x to v4.0.0 before you're intentionally ready.

On the new v4 branch, this setting becomes counterproductive:

  • The branch is the new major version. Its first release should be v4.0.0.
  • Leaving the setting in would suppress the major-version semantics of breaking-change commits — exactly the opposite of what you want on a branch that exists to ship a major release.
  • Removing it lets release-please process feat!: commits normally and produce the correct initial v4.0.0 release.
    In short: the setting prevents premature major bumps on a stable branch; on a branch that is the next major version, there's nothing premature to prevent, so it gets dropped.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that's right. According to RP's doc:

| --bump-minor-pre-major | boolean | Configuration option for the versioning strategy. If set, will bump the minor version for breaking changes for versions < 1.0.0 |

Since we aren't pre v1.0.0, this change shouldn't affect anything.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, OK, it looks like Claude thought it meant RP would bump a minor version for ANY breaking change, regardless of what the current version is.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude threw me under the bus with its response:

Recommendation: Acknowledge Matthew is right. The removal is harmless cleanup of dead config, not a functional change. Your earlier explanation attributed too much power to this setting.

Transitions go-server-sdk-evaluation to its v4 major version per Go's
semantic import versioning. With easyjson removed in the prior commit,
this is the natural moment to take the major bump.

Changes in this commit:
- go.mod: module path /v3 -> /v4; both upstream libs (go-jsonstream,
  go-sdk-common) pinned at /v4 dev pseudo-versions
- All .go files: import paths /v3 -> /v4 for this module's own packages
  and both upstream libs
- README.md: badge link and pkg.go.dev link refs from /v3 -> /v4
- Makefile: coverage-enforcer package path /v3 -> /v4
- .release-please-manifest.json: 3.0.1 -> 4.0.0
- release-please-config.json: drop bump-minor-pre-major (v4 is post-1.0)

Workflow file (release-please.yml, ci.yml, check-go-versions.yml)
changes for v4 are landing in #53
separately.

Part of the SDK-2113 EasyJSON removal project, shipping these libraries
as v4 majors per the v3 -> v4 strategy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aaron-zeisler aaron-zeisler force-pushed the aaronz/SDK-2118/remove-easyjson branch from 03e0ff3 to 972f9c7 Compare May 28, 2026 18:52
The easyjson source files are gone as of this branch, so the
EASYJSON_TAG variable and the build-easyjson, test-easyjson, and
benchmarks-easyjson targets are dead code. Remove them.

Passing -tags launchdarkly_easyjson to go build still compiles fine
(Go ignores unknown tags), so downstream users are not broken — but
there's no reason for the Makefile to pretend the variant exists.
@aaron-zeisler aaron-zeisler force-pushed the aaronz/SDK-2118/remove-easyjson branch from 8db5138 to 9ca10c6 Compare May 28, 2026 21:18
@aaron-zeisler aaron-zeisler merged commit 7ffc22a into v4 May 29, 2026
13 checks passed
@aaron-zeisler aaron-zeisler deleted the aaronz/SDK-2118/remove-easyjson branch May 29, 2026 17:18
@github-actions github-actions Bot mentioned this pull request May 29, 2026
aaron-zeisler pushed a commit that referenced this pull request May 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[4.0.0](v3.0.1...v4.0.0)
(2026-05-29)


### ⚠ BREAKING CHANGES

* remove easyjson from go-server-sdk-evaluation
([#51](#51))

### Features

* remove easyjson from go-server-sdk-evaluation
([#51](#51))
([7ffc22a](7ffc22a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> The diff only updates version metadata and changelog text; runtime
risk depends on the already-merged easyjson removal when consumers
upgrade major versions.
> 
> **Overview**
> This is an automated **Release Please** PR that publishes **v4.0.0**
by updating `.release-please-manifest.json` from `3.0.1` to `4.0.0` and
adding the corresponding **CHANGELOG** section.
> 
> The release notes document a **breaking change**: removal of
**easyjson** from the library (see
[#51](#51)).
Consumers upgrading to v4 should expect that integration path and any
`launchdarkly_easyjson` build-tag behavior from prior releases are no
longer part of this major version.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
bf42650. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants