You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
util-app: make the App#flags field and Flags class final
Problem
`App` is a trait that exposes non-final fields as `val`, which can result
in access ordering issues when fields are overridden and then accessed
by the base trait. While attempting to solve this problem, `Flags`
overrides introduce other complications, as there are multiple ways to
hook into flag parsing (via both `App#parseArgs` and `Flags#parseArgs`.
Solution
We move our `val` fields to `def` and expose the necessary properties that
can be overridden to achieve the existing behavior, just more consistently.
We make the `App#flags` def final and `Flags` class becomes final.
The `App#name` val is similarly made a `def`.
JIRA Issues: CSL-11231
Differential Revision: https://phabricator.twitter.biz/D723956
0 commit comments