question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Harmonize Config/Configuration/PropertyAttribute

See original GitHub issue

As noted in #420 we have about a handful of configuration types that have slightly different property names.

As much as possible we should limit the number of different configuration types. At least make all the names the same to avoid confusion.

Also, the basic Config type https://github.com/fscheck/FsCheck/blob/master/src/FsCheck/Runner.fs#L39 should become a POCO mutable type - that means we can probably get rid of a few wrappers. And also, F# record types in a public API are basically a big no-no, as they can’t be changed without breaking compatibility.

This should happen on the fscheck3 branch, and where possible add/deprecate in v2.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
LaurenceJKingcommented, Apr 13, 2020

Hi, I was just taking a look at this issue, to see if I could sort it out. I have a question about Replay value.

//in RunnerExtensions.fs member __.Replay with get() = (match replay with None -> Unchecked.defaultof<uint64*uint64*int> | Some s -> (s.Rnd.Seed,s.Rnd.Gamma,defaultArg s.Size 0)) and set(v) = replay <- Some <| let s,g,size = v in { Rnd = Random.createWithSeedAndGamma (s,g); Size = if size = -1 then None else Some size }

When we get the Reply property, we get 0 if Size is none. But when we set the Replay property, Size is only set to none if the value is -1.

Is there any particular reason for this?

0reactions
kurtschelfthoutcommented, Apr 25, 2020

Making one type is one way to approach this, yes. Maybe you can use overloads with both FSharpFunc and Func, or use the trick elsewhere of making the “core” type F# friendly and then having C# friendly extension methods on it (see e.g. Arbitrary and ArbitraryExtensions etc). In any case I don’t want to choose one over the other, there is normally a way (typically overloading and using attributes to hide methods from intellisense in one language but not the other etc) to present a nice interface to both languages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Your Harmonize Turnitin Integration
Overview Administrators can integrate Turnitin Similarity with Harmonize using API keys provided by Turnitin. This tool will help...
Read more >
HARMONIZE
HARMONIZE is committed to the research and development of motorcycle racing parts, adhering to the original intention - harmonious madness, ...
Read more >
Online Discussion Boards & Collaboration Tools | Harmonize
Instructors increase student engagement in their courses while saving time with Harmonize's online discussion & collaboration tools. Learn more.
Read more >
HarmonizeProject/harmonize.py at master · MCPCapital ...
Harmonize Project lets you sync HDMI video with Philips Hue lights using a Raspberry Pi! - HarmonizeProject/harmonize.py at master ...
Read more >
Harmonizome
Harmonizome 3.0. Search for genes or proteins and their functional terms extracted and organized from over a hundred publicly available resources.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found