Stream: ideas

Topic: testing documentation on the website


view this post on Zulip Rick Hull (Jan 25 2026 at 17:08):

I don't see much on testing, but maybe not looking in right places. What do we have currently, both new and old compilers, and what is our "test documentation posture" or strategy, new and old?

view this post on Zulip Anton (Jan 26 2026 at 07:52):

I think we just have the testing section in the tutorial: https://github.com/roc-lang/www.roc-lang.org/blob/1b2ee476399b4d1fcebb3721f66d55fc98ebf4d3/website/content/tutorial.md?plain=1#L1403

view this post on Zulip Anton (Jan 26 2026 at 07:53):

what is our "test documentation posture" or strategy,

Do you mean for compiler developers or Roc users?

view this post on Zulip Rick Hull (Jan 26 2026 at 10:38):

Roc users. Thinking more about new compiler than old.

view this post on Zulip Rick Hull (Jan 28 2026 at 00:39):

here is what I'm starting to work thru: EXPLORATORY_TESTING.md

UPDATED: EXPLORATORY_RESULTS.md

view this post on Zulip Rick Hull (Jan 28 2026 at 04:45):

First draft finalized, completely focused on new compiler: EXPLORATORY_RESULTS.md [Jan 27 11:55PM ET]

Interesting results:

  1. runtime expect assertions -- currently not optimized away by roc build
  2. runtime expect on hosted functions at toplevel: works
  3. roc run and roc test are completely disjoint in the expects they target

This effort only documents current behavior, not necessarily desired behavior. Several scripts were developed along the way (examples/expect/*.roc) that can be used to guide desired behavior or prevent regressions.

view this post on Zulip Anton (Jan 28 2026 at 09:26):

  1. runtime expect assertions -- currently not optimized away by roc build

I believe they only need to be optimized away when running roc build --opt=speed and also --opt=size. But there was some debate about leaving them in for opt=speed to, I'm not completely sure what we landed on.

view this post on Zulip Anton (Jan 28 2026 at 09:26):

  1. roc runand roc test are completely disjoint in the expects they target

That is intended behavior but I do see how it can be confusing

view this post on Zulip Rick Hull (Jan 28 2026 at 13:11):

I think the disjoint nature actually helps understanding. An interesting finding, not in a pejorative sense. I think I had this idea, roughly, going in, and it seems total and absolute, a nice property.

I tried all -- opt values; currently no behavior difference between any --opt and no --opt, as expected given the state of optimization for the new compiler, as I understand.


Last updated: Jun 16 2026 at 16:19 UTC