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 Flow to v0.188.0 #12588

Merged
merged 72 commits into from
Apr 3, 2023
Merged

Upgrade Flow to v0.188.0 #12588

merged 72 commits into from
Apr 3, 2023

Conversation

davojta
Copy link
Contributor

@davojta davojta commented Feb 24, 2023

Part of #12194

The main changes in this PR are:

  • Use interfaces as supertypes of objects and classes since flow prevents objects from being a supertype of a class.
  • Switch to the arrow method properties to avoid Flow restrictions on method unbinding. See also Switch to @javascript-obfuscator/escodegen unassert-js/rollup-plugin-unassert#10
  • Enable constrain_writes inference mode
  • Use local type inference where needed
  • Remove the * (existential) type where needed

Launch Checklist

  • briefly describe the changes in this PR
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog></changelog>

src/util/mapbox.js Fixed Show fixed Hide fixed
src/util/mapbox.js Fixed Show fixed Hide fixed
@stepankuzmin stepankuzmin changed the title draft - Flow 0.155.1 Upgrade Flow to v0.177.0 Feb 24, 2023
@stepankuzmin stepankuzmin added the skip changelog Used for PRs that do not need a changelog entry label Feb 24, 2023
@davojta davojta changed the title Upgrade Flow to v0.177.0 Upgrade Flow to v0.184.0 Feb 24, 2023
src/util/config.js Fixed Show fixed Hide fixed
src/util/config.js Fixed Show fixed Hide fixed
@stepankuzmin stepankuzmin changed the title Upgrade Flow to v0.184.0 Upgrade Flow to v0.188.0 Feb 27, 2023
@stepankuzmin stepankuzmin marked this pull request as ready for review February 27, 2023 15:33
@stepankuzmin stepankuzmin requested a review from a team as a code owner February 27, 2023 15:33
@stepankuzmin stepankuzmin force-pushed the flow-0.155.1 branch 2 times, most recently from 3b3884d to 0d683be Compare March 6, 2023 15:46
@stepankuzmin
Copy link
Contributor

Unfortunately, there is no way of suppressing the method-unbinding error for the project since Flow supports only inline comments error suppression https://flow.org/en/docs/errors/

stepankuzmin and others added 13 commits March 31, 2023 14:57
* fix eslint problems for source_cache.js

* fix eslint problems for style/style.js

* fix eslint problems for util/actor.js

* fix eslint problems for ui/map.js

* fix eslint problems for ui/marker.js

* fix eslint problems for ui/camera.js

* fix eslint problems for terrain/terrain.js

* fix eslint problems for ui/handler_manager.js
Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

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

The PR looks great in general, and while the $FlowFixMe[method-unbinding] thing is unfortunate, the alternative is worse (arrow methods are less widely supported and have bundle size overhead), and I think we should land the PR to move forward with typing coverage — perhaps we can address those later.

src/render/painter.js Outdated Show resolved Hide resolved
src/data/load_geometry.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Used for PRs that do not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants