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

Exclude react-dom when flow checking other builds #16737

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

sebmarkbage
Copy link
Collaborator

I pulled this commit out of #16725 into a separate PR.

Any given build cannot be self-consistent if we type check all the files that are part of other builds. That's because the HostConfig is swapped out.

Imagine for example a shared method that accepts an Instance type:

// Reconciler.js
export function render(instance: Instance) {

}

And a file specific to ReactDOM might reference this:

// ReactDOM.js
import  {render} from "reconciler";
export function renderToId(id: string) {
  render(document.getElementById(id));
}

But when we check the native file this won't work.

This is because the HostConfig can't be guaranteed to be consistent with other code such as code that touches the DOM directly.

Ideally we'd have a more systemic solution to this since it will pop up for other packages later too.

This is because the HostConfig can't be guaranteed to be consistent with
other code such as code that touches the DOM directly.

Ideally we'd have a more systemic solution to this since it will pop
up for other packages later too.
@sizebot
Copy link

sizebot commented Sep 10, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS against 07bedae

Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

Stamping to unblock

@sebmarkbage sebmarkbage merged commit 35bf9d2 into facebook:master Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants