On 2026-04-21 07:45, Peter McGoron wrote:
> On 4/21/26 05:00, Andrew Tropin wrote:
>> Also, you don't have to implement it via procedure properties/tags, you
>> can make suite-thunk create a thunk, register it in some common global
>> registry and return the thunk. This way (suite-thunk? ...) will use
>> this registry to determine if arbitrary lambda is suite-thunk or not.
>>
>> This only problematic in terms of gc, as those suites won't be gced.
>> But for dev and test envs it should be fine.
>
> Technically speaking, the R6RS has no portable way to make a registry of
> procedures. However I think every implementation allows putting
> procedures in alist as a key, so that is probably not a problem in practice.
>
> I assume most suite-thunks would exist in libraries, where they wouldn't
> be GC'd anyways. So I agree, it should be fine.
Good. Anyway, I made a note and will keep it in mind. Will check it in
practice when/if will be writing a portable implementation.
Also, probably I'll make suite-thunk? optional in the spec. As most of
the time you can just do (with-test-runner my-tr (my-all-tests)).
with-test-runner will parameterize current test-runner and my-all-tests
is a compound suite, which includes all other suites and (my-all-tests)
will load all defined tests. It will require to manually add all the
suites to it, but it will be a way to load and run tests without
suite-thunk? and dicovery.
--
Best regards,
Andrew Tropin