Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/yggdrasil feature enabled #259

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

sighphyre
Copy link
Member

Forces the Java SDK to resolve feature enabled from Yggdrasil rather than computing it separately from isEnabled + getVariant

@@ -22,7 +22,14 @@ public String getToggleName() {

public Variant getExpectedResult() {
if (expectedResult.getName().equals("disabled")) {
return Variant.DISABLED_VARIANT;
Variant clone =
new Variant(
Copy link
Member Author

@sighphyre sighphyre Jan 8, 2025

Choose a reason for hiding this comment

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

This seems really dumb, is there a better way to clone an object without making a copy constructor?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can have a clone method that does this for you, but the code will be there... I remember there were some utility methods, but atm I think this is fine

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

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

LGTM!

pom.xml Outdated
@@ -10,7 +10,7 @@
<version.junit5>5.10.3</version.junit5>
<version.okhttp>4.12.0</version.okhttp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.unleash.specification>5.1.5</version.unleash.specification>
<version.unleash.specification>5.1.9</version.unleash.specification>
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work well with #260 where you had to roll down?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does not! It's on the list of things to do prior to release - a proper set of tests around Windows + unicode. But this is okay for now so these PRs don't get too big I think

@@ -22,7 +22,14 @@ public String getToggleName() {

public Variant getExpectedResult() {
if (expectedResult.getName().equals("disabled")) {
return Variant.DISABLED_VARIANT;
Variant clone =
new Variant(
Copy link
Contributor

Choose a reason for hiding this comment

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

You can have a clone method that does this for you, but the code will be there... I remember there were some utility methods, but atm I think this is fine

@sighphyre sighphyre merged commit 937b29c into yggdrasil-engine Jan 14, 2025
9 checks passed
@sighphyre sighphyre deleted the feat/yggdrasil-feature-enabled branch January 14, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants