Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Two bugs related to Issue 8 #11

Merged
merged 1 commit into from Feb 6, 2022

Conversation

sgerber-prospection
Copy link
Contributor

Fixes #8

First issue from @nikimicallef was because of return this inside withValue(). It mutated the class in place, and specificValues map was lost if further config calls were made. I guess either approach would work but can't mix and match, so fixed by making withValue() also return a copy.

Second issue - specific values are lost of they are defaulted and useDefaultsValues is true was a logic bug, resolved by checking to see if the constructor param is defined and not throwing it away if so.

I guess it should be noted these fixes between them change behaviour that some unfortunate tests may have been accidentally relying on? When released probably worth noting...

Copy link
Contributor

@steveorourke steveorourke left a comment

Choose a reason for hiding this comment

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

Hey @sgerber-prospection. PR looks good. However, I need you to sign the Tyro CLA before I can merge. See instructions in CONTRIBUTING.md

@sgerber-prospection
Copy link
Contributor Author

Hey @sgerber-prospection. PR looks good. However, I need you to sign the Tyro CLA before I can merge. See instructions in CONTRIBUTING.md

Hey Steve! Been a while! But I guess PR comments aren't the best place to catch up ;)

I sent CLA to opensource@tyro.com over the weekend, but let me know there is an alternative email or it can't be located.

@steveorourke steveorourke merged commit 1dc757b into tyro:master Feb 6, 2022
@steveorourke
Copy link
Contributor

Merged. Thanks @sgerber-prospection!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: useDefaultValues overrides withValue
3 participants