Skip to content

Commit

Permalink
Add super helpful explanation of previously confusing error-on-read
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelidlessness committed May 29, 2024
1 parent c723dbe commit a60e384
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/scenario/test/serialization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,23 @@ describe('ExternalSecondaryInstanceParseTest.java', () => {
/**
* **PORTING NOTES**
*
* The original notes below were answered with
* {@link https:/getodk/web-forms/pull/110#discussion_r1614139373 | this excellent explanation}:
*
* > This is the result of a bunch of implementation details/decisions in JR
* > and Collect. As you've noted in some earlier tests, lists of select
* > options are not part of the DAG/recomputation model. Choice lists are
* > only computed when they need to be displayed. In some cases, this can
* > result in a significant perf improvement.
* >
* > So the choicesOf call computes the choices. And that's fine even if the
* > references for label and name don't exist because that just returns the
* > entirety of every choice item. It's only when a selection is made that
* > there's an attempt to use the specified references and that causes a
* > crash.
*
* - - -
*
* Expanding on the mental model we're trying to form in the skipped test
* directly above...
*
Expand Down

0 comments on commit a60e384

Please sign in to comment.