sschwarzer
2021-12-20 18:46:26

Is it possible with raco test to run only a specific test suite (e.g. specified by it’s name)? I haven’t found anything in the docs.


samth
2021-12-20 18:55:35

No, there isn’t any functionality like that, although it would be nice to have.


sschwarzer
2021-12-20 18:58:50

I got the hint. :wink: I’m putting it on my todo list. :slightly_smiling_face:


samth
2021-12-20 18:59:39

I wasn’t trying to hint, just saying that it wasn’t intentionally omitted. :wink:


sschwarzer
2021-12-20 19:00:49

Sorry, I couldn’t help it. :smile:


samth
2021-12-20 19:05:22

But if you wanted to do it, then I think a good approach would be (a) having raco test take an argument that sets some parameter that (b) rackunit or other testing frameworks could read and decide to run/not run some tests.


sschwarzer
2021-12-20 20:01:32

I added a ticket to avoid that I forget your suggested approach (and also as a reference for me, of course): https://github.com/racket/racket/issues/4107


sorawee
2021-12-20 20:36:12

Hi @badkins! @soegaard2 told me that you found in-inclusive-range to be slower than in-range sometimes. Could you provide some examples?


badkins
2021-12-20 20:37:39

<sigh> I didn’t even realize there was in-inclusive-range :( I was using my own naive function, inclusive-range, which simply returns a list :) Thanks for the tip!!


soegaard2
2021-12-20 20:37:50

Ah!


sorawee
2021-12-20 20:38:42

Yeah, in-inclusive-range should be as fast as in-range. FWIW, inclusive-range is also an actual function already pre-defined in Racket, too!


badkins
2021-12-20 20:38:44

Of course, it’s even faster to code the loop manually, which is what I’m doing now…


sorawee
2021-12-20 20:41:07

Another thing is, even though range and inclusive-range return a list, if it appears directly within a for clause, it should be as efficient as in-range/in-inclusive-range too.


sschwarzer
2021-12-20 20:55:56

I have changed some APIs in a module and now want to update the Scribble documentation. Since the documentation contains several executable code snippets, the document generation fails. Is there a way to get the documentation partially generated on a “best effort” basis, so it’s easier for me to see where I still need to make changes?


sschwarzer
2021-12-20 21:40:25

For now, I’ll comment out everything from the broken location until the end of the document, so I can at least generate the documentation up to the comment.


sorawee
2021-12-20 21:46:34

> a “best effort” basis, so it’s easier for me to see where I still need to make changes What happens currently? Does it refuse to render the document?


sorawee
2021-12-20 21:47:55

I think this should not be happening for run-time error—Scribble can already cope with that, but for compile-time error, I’m not sure. I thought it can cope with it too, but I might misremember


sschwarzer
2021-12-20 21:49:13

Without the commenting, it fails because I changed the name of a function that’s used in one of the code examples. So I get an error for an unbound identifier.


sschwarzer
2021-12-20 21:50:10

> but for compile-time error, I’m not sure. I thought it can cope with it too, but I might misremember Yes, I think my problem qualifies as a compile-time error (assuming the processing is like in #lang racket).


sorawee
2021-12-20 22:04:02

OK, I remember it wrong. Looks like both run-time and compile-time error result in failure alike


alexharsanyi
2021-12-20 22:22:40

I wrote a package that does something similar, except that you need to modify the run-tests invocation instead of using the command line to omit test suites. You could use that package as a starting point for what you want to do;



sschwarzer
2021-12-20 23:17:16

I’ll try it tomorrow because I’m too tired now, but from the documentation the package looks great! :slightly_smiling_face:


sorawee
2021-12-21 01:47:51

@sschwarzer add this to your Scribble file at the top

@(let ([this-handler (scribble-eval-handler)]) (scribble-eval-handler (λ (f show? expr) (with-handlers ([exn:fail? values]) (this-handler f show? expr)))))