Polymer / polymer

Our original Web Component library.
https://polymer-library.polymer-project.org/
BSD 3-Clause "New" or "Revised" License
22.04k stars 2.01k forks source link

Build computed graph from dependencies, rather than properties. #5568

Closed kevinpschaaf closed 5 years ago

kevinpschaaf commented 5 years ago

Previously, the orderedComputed algorithm started at the element's properties to build the DAG of edges used to sort the computed effects. However, this would miss any undeclared dependencies of computed properties, causing those computed properties to fail to be correctly inserted into the final order.

This change builds the "ready" list of properties from the keys of the computed effects (properties that kick off computed effects) rather than properties, which removes the footgun around undeclared dependencies.