Skip to content

Introduce Builder struct for Output

ivan tkachenko requested to merge work/ratijas/builder into master

This would allow remove some setters from public access, essentially protecting Output from unauthorized modifications that might break invariants of individual outputs or config as a whole. Most notably, setId() and setPrimary().

  • Changing ID on the fly is just meaningless and dangerous, as multiple components (mostly Config) rely on it being constant, e.g. using as a key in a OutputList map.
  • Managing who's the primary one (or soon-to-be shuffling priorities order around) is a responsibility of a Config, so all the code would need to be ported to calling corresponding method on config objects instead.

Merge request reports