Early init FuseboxClientMetadataModel #25
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Followup from #24. We want to not just positively detect the Fusebox client, but detect the use of non-Fusebox clients as well. To this end, we want to guarantee that the Fusebox frontend always sends
FuseboxClient.setClientMetadata
before (say)Runtime.enable
, so that if we receive aRuntime.enable
message without a precedingFuseboxClient.setClientMetadata
, we know we're dealing with a non-Fusebox client.As mentioned in a code comment, there's a proper way to express dependencies between frontend models, and we should do that. For now, I want to avoid duplicating the work that @hoxyq is currently doing in the stack of #19 to set up the first RN-specific models. We can follow up on this when those PRs have landed.
Test plan
Tested as part of https://www.internalfb.com/diff/D55122115.
Upstreaming plan
devtools-frontend
repo. I've reviewed the contribution guide.