Fork me on GitHub
#clojure-spec
<
2021-09-02
>
41ph4_Ph4un15:09:29

Hi, I'm having a weird issue where I only call (st/instrument) in my code and aim to instrument only the used functions in my code base

41ph4_Ph4un15:09:47

but somehow it seems to begin to generate arguments for some of the functions in the codebase

41ph4_Ph4un15:09:35

If I'm only aiming to instrument my code, I shouldn't need clojure.test.check and its submodules, right?

41ph4_Ph4un15:09:20

somehow when I run my program it whines those need to be required.. then when I add them it begins to generate inputs and all hell breaks loose

borkdude15:09:52

@theamazingekko do you by any chance use s/fspec ?

41ph4_Ph4un15:09:22

and yes, I do use s/fspec

41ph4_Ph4un15:09:28

oh boy do I use it!

41ph4_Ph4un15:09:39

so okay.. I'm starting to get a picture here

41ph4_Ph4un15:09:28

so it is possible that instrumentation may attempt to generate arguments for arguments that are functions in some cases?

41ph4_Ph4un15:09:35

if theres HOFs

41ph4_Ph4un15:09:52

hmm... so if this is a problem I need to maybe simplify those specs.. maybe by using ifn? instead of full-fledged f/spec

41ph4_Ph4un15:09:20

are there any other workarounds.. in a way I'd like to keep that stricter form so I could then run generative tests separately later on

41ph4_Ph4un15:09:12

can I be a total pig and set clojure.spec.alpha/*fspec-iterations* to 0 😄 😄 😄

borkdude16:09:33

yes, I think this is an "interesting" feature of spec

41ph4_Ph4un16:09:28

yeah it seems that just restricting the iterations solved my issues for now

41ph4_Ph4un16:09:37

thanks! I've been stuck with this over a day 😄

41ph4_Ph4un16:09:11

basically it was just about finding a right config.. it's very "interesting" indeed