Skip to content

Conversation

@treuherz
Copy link
Contributor

This PR

The exp module does not have the same compatibility guarantees as the standard library. The fact that it stays on a pseudo-version instead of a proper semver tag, and the possibility for backwards-incompatible changes, makes depending on exp in a widely-imported library a bit risky. If a dependent of the SDK updated the version of exp they relied on, the MVS algorithm could select a version that broke the SDK's usage of exp's packages.

Out of an abundance of caution, I'm trying to reduce the use of exp in our private shared libraries for this reason, and the OpenFeature SDK is our only external dependency that depends on it it. The uses are pretty small. I've replaced them with existing standard library functiosn where possible, or in one place implemented the functionality myself, since maps.Values is only available in the standard library from go 1.23.

While in the area, I've also updated a couple of functions that are already replaceable with functions from the standard slices package.

How to test

Unit and E2E tests all pass localy.

@treuherz treuherz requested a review from a team as a code owner February 13, 2025 12:30
@treuherz treuherz changed the title Remove dependency on golang.org/x/exp refactor: remove dependency on golang.org/x/exp Feb 13, 2025
@codecov
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.78%. Comparing base (c2eb5af) to head (887c5cf).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
- Coverage   86.88%   86.78%   -0.10%     
==========================================
  Files          13       13              
  Lines        1372     1362      -10     
==========================================
- Hits         1192     1182      -10     
  Misses        156      156              
  Partials       24       24              
Flag Coverage Δ
e2e 86.78% <100.00%> (-0.10%) ⬇️
unit 86.78% <100.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@beeme1mr
Copy link
Member

Greets @treuherz, could you please update this branch? Your fork must not allow me to update it myself. Please @ mention me once it's up to date so I can merge the change. Thanks again for the PR.

The exp module does not have the same compatibility guarantees as the
standard library. The fact that it stays on a pseudo-version instead of
a proper semver tag, and the possibility for backwards-incompatible
changes, makes depending on exp in a widely-imported library a bit
risky. If a dependent of the SDK updated the version of exp they relied
on, the MVS algorithm could select a version that broke the SDK's usage
of exp's packages.

Out of an abundance of caution, I'm trying to reduce the use of exp in
our private shared libraries for this reason, and the OpenFeature SDK is
our only external dependency that depends on it it. The uses are pretty
small. I've replaced them with existing standard library functiosn where
possible, or in one place implemented the functionality myself, since
`maps.Values` is only available in the standard library from go 1.23.

While in the area, I've also updated a couple of functions that are
already replaceable with functions from the standard slices package.

Signed-off-by: Eli Treuherz <et@arenko.group>
auto-merge was automatically disabled February 18, 2025 15:54

Head branch was pushed to by a user without write access

@treuherz
Copy link
Contributor Author

@beeme1mr Rebased!

@beeme1mr beeme1mr merged commit 38e2300 into open-feature:main Feb 18, 2025
8 checks passed
@treuherz treuherz deleted the remove-exp branch February 19, 2025 10:20
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