Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Flow 0.136.0 #1751

Merged
merged 1 commit into from Oct 21, 2020
Merged

Upgrade to Flow 0.136.0 #1751

merged 1 commit into from Oct 21, 2020

Conversation

mwiencek
Copy link
Member

It's now an error for generics to escape outside of the scope they're defined in. Which usually just means that if a variable's type contains a generic type variable, then we can't pass that variable around without also passing the associated generic.

))}
{TYPE_OPTION_GROUPS.map((group) => (
Object.entries(group)
// $FlowIssue[incompatible-call]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't group be typed to avoid this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already typed, but the issue is that Object.entries is hard-coded to return Array<[string, mixed]>. You can't use mixed without either refining it or casting it to any first, and both of those are worse solutions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that sucks :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect they'll fix the type eventually (I see they're working on improving generics checking as we speak). So the error suppression isn't so bad in the meantime: unlike any it doesn't prevent marking the file as strict, it only affects incompatible-call and not other kinds of errors, and we can run Flow with --include-warnings to find unneeded error suppression comments in the future.

It's now an error for generics to escape outside of the scope they're
defined in. Which usually just means that if a variable's type contains
a generic type variable, then we can't pass that variable around without
also passing the associated generic.
@mwiencek mwiencek merged commit e525dcc into metabrainz:master Oct 21, 2020
@mwiencek mwiencek deleted the flow-0.136 branch October 21, 2020 19:04
reosarevok added a commit that referenced this pull request Oct 28, 2020
* master:
  Update POT files using the production database
  Update translations from Transifex
  MBS-7219: Hide links to empty ArtistRecording subsets (#1718)
  MBS-11185: Add "is not" operator to link_type edit search (#1756)
  MBS-11200: Add works to VGMdb autocleanup (#1763)
  MBS-11174: Add historic release adds to UserEditsProperty (#1748)
  MBS-11199: Remove superfluous 7digital parameters (#1764)
  MBS-11204: Avoid crashing if entity1_id is missing (#1765)
  Sort Amazon domains for legibility
  Eslint fixes: max-len
  Upgrade React to v17 (#1762)
  MBS-11192: Add voting-icon for Approve (#1755)
  MBS-11197: Add validation for Mainly Norfolk links
  MBS-11197: Normalize mainlynorfolk links
  MBS-11177: Drop "Description" label from type_bubble (#1749)
  MBS-11186: Add missing space between class names (#1752)
  Switch to new JSX transform (#1759)
  Upgrade to Flow 0.136.0 (#1751)
  Add /wiki to generasia favicon check
  MBS-11195: Convert the artist-credit-renamer to React
  Add missing <tbody> to EditArtistCredit
  Replace jquery with empty module in server bundle
  Convert form_row_name_with_guesscase to React
  Remove unused closeWhenFocusIsLost logic
  Add basic Modal and Popover components
  Add @sentry/browser libdefs
  Add popperjs
  Undo unneeded MBS-10901 changes
  MBS-11194: Fix ISE when historic EditRelationship data is broken
  MBS-11196: Whitelist saisaibatake.ame-zaiku.com for instruments
  MBS-11189: Stop highlighting PureVolume links (#1753)
  MBS-11182: Stop highlighting LyricWiki links (#1750)
  MBS-11158: Make relationship type rowids visible to all (#1738)
  Try to improve suggested recordings
  MBS-10829: Fix SOLR syntax for recording with no length
  Evaluate Sentry DBDefs values in scalar context
  Enable the ErrorInfo plugin even when Sentry is disabled
  MBS-11160: ISE pages display empty stack traces
  Rename $stash->{stack_trace} to _stack_trace_info
  Move frame filtering to Devel::StackTrace call
  MBS-11161: Fix error page display for actions using React
  MBS-10281: Fix mojibake on error pages
  Rename Sentry modules to be more general
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants