• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Roblox / roact / 706
95%

Build:
DEFAULT BRANCH: master
Ran 19 Mar 2020 05:59PM UTC
Jobs 1
Files 36
Run time 14s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
706

push

travis-ci

web-flow
Fix prop-context update tearing (#260)

This PR tries to fix the update tearing behavior I discovered and reported in
#259 based on a solution that my team has been discussing. I introduced a fairly
small and robust test that is currently failing to indicate the problem with our
current state and the quick-fix solutions to this problem.

Context values are no longer based on bindings and now instead use a small cell
that contains a value and an update signal.

Providers now update context values in two passes:
1. In `willUpdate`, the provider updates the value of the context entry but do
   not fire any signals. This should cause downstream consumers to be able to
   immediately read the new value on their next render. Their next render will
   occur immediately unless an intermediate component implements `shouldUpdate`.
2. In `didUpdate`, the provider fires the signal portion of the context entry.
   This will notify any consumers.

Consumers are now a little dumber and simpler. They no longer track the current
context value in state, but instead track the last value they were updated with.
When an update signal is received from their corresponding provider's
`didUpdate` hook, consumers now compare the new value with the value they were
last updated with, stored in their `didUpdate` hook. If these values differ, we
can assume that there was a component between the consumer and provider that
returned `false` to `shouldUpdate`, and trigger an update.

I dramatically increased the documentation around affected code to make these
kinds of issues more clear to us in the future.

1262 of 1340 relevant lines covered (94.18%)

49.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 706.1 (LUA="lua=5.1") 19 Mar 2020 05:59PM UTC 0
94.18
Travis Job 706.1
Source Files on build 706
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #706
  • d1b1db25 on github
  • Prev Build on master (#GITHUB_A...)
  • Next Build on master (#F55538B5...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc