This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Merged
Conversation
Collaborator
No problem for me. Breaking changes is a fact of life anyway. (Unsubscribing, ping me if needed.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adding an ability to merge
AutoGenConfigs.This can also be used to finally enable hedgehogqa/fsharp-hedgehog-xunit#11 (cc @dharmaturtle)
In order to do it in a useful way we need to update
AutoGenConfigfields types forseqRangeandrecursionDepthto be optional.This would allow us to preserve values that are set by user rather than override them with the default values on each merge.
I also made the constructor
internalso that in the future, if we want to extend the type or update it, we won't face breaking users. And in the record we can use types that have no reason to be exposable to external consumers, likeGeneratorCollection.Scenario:
I may want to configure my project-level "default" value of
AutoGenConfig, registering generators and setting meaningful (to me) defaults forseqRangeandrecursionDepth.With
XUnitsupport is done via attributes.Then on test level I can also specify attributes, which would be contributing to my "global default"
AutoGenConfig.And unless I explicitly configured different
seqRangeorrecursionDepthI want my "global default" settings to be preserved.NOTE: THIS IS A BREAKING CHANGE!
However, it is a very narrow use case that only breaks a very small amount of usages.
In fact, searching through GItHub I only found one case that will break: https://github.com/cmeeren/Fling/blob/4041b69995ad5176f7b550d20b1472a681425004/src/Fling.Tests/Tests.fs#L100
@cmeeren, I do not think that it'd be a huge deal to update that line?
Of course, there can be private repositories in which we cannot see.
But I think that this breaking change should be easy to recover from...