Skip to content

Commit

Permalink
@allow-large-files Deploy Flow v0.99.0 to xplat/js
Browse files Browse the repository at this point in the history
Reviewed By: dsainati1

Differential Revision: D15541620

fbshipit-source-id: e19795e13d47dca58c5603b308b7cd60ba67ef86
  • Loading branch information
samwgoldman authored and facebook-github-bot committed May 30, 2019
1 parent 3efecaa commit 6ba5890
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ untyped-import
untyped-type-import

[version]
^0.98.0
^0.99.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"fb-watchman": "^2.0.0",
"fbjs": "^1.0.0",
"fbjs-scripts": "^1.1.0",
"flow-bin": "^0.98.0",
"flow-bin": "^0.99.0",
"graphql": "^14.2.0",
"gulp": "4.0.0",
"gulp-babel": "8.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/relay-compiler/bin/RelayCompilerMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,15 @@ function getLanguagePlugin(language: string): PluginInterface {
// eslint-disable-next-line no-eval
let languagePlugin: LanguagePlugin = eval('require')(requirePath);
if (languagePlugin.default) {
/* $ /* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.99 was deployed. To see the error, delete
* this comment and run Flow. */
languagePlugin = languagePlugin.default;
}
if (typeof languagePlugin === 'function') {
/* $ /* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.99 was deployed. To see the error, delete
* this comment and run Flow. */

This comment has been minimized.

Copy link
@alloy

alloy Jun 3, 2019

Contributor

These don’t seem formatted correct, but even after fixing them they still show up when I run yarn flow check. What gives?

This comment has been minimized.

Copy link
@kassens

kassens Jun 5, 2019

Member

@alloy: The flow team does their deploy across the monorepo which then syncs out here. Because of the amount of changes sometimes needed, those broad changes are sometimes not super clean and can use cleanup later...

This comment has been minimized.

Copy link
@alloy

alloy Jun 5, 2019

Contributor

@kassens Makes sense 👍 What I was wondering too, tho, is why the multi-line comment didn’t work at all to silence it, only a single line did?

This comment has been minimized.

Copy link
@kassens

kassens Jun 5, 2019

Member

The .flowconfig has a regex that matches $FlowFixMe(>=VERSION site=SITE), only if SITE contains oss, that allows ignoring errors in certain environments such as desktop web and React Native or oss.

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*oss[a-z,_]*\\)?)\\)

This comment has been minimized.

Copy link
@alloy

alloy Jun 5, 2019

Contributor

Ooohhh, nice. Thanks for explaining 👍

return languagePlugin();
} else {
throw new Error('Expected plugin to export a function.');
Expand Down
12 changes: 12 additions & 0 deletions packages/relay-compiler/core/GraphQLCompilerProfiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,14 @@ function instrumentAsyncContext<F: (...any) => Promise<any>>(
if (!enabled) {
return fn;
}
/* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.99 was deployed. To see the error, delete this comment
* and run Flow. */
const profileName = name || fn.displayName || fn.name;
const instrumented = async function() {
/* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.99 was deployed. To see the error, delete this
* comment and run Flow. */
const traceId = start(profileName);
try {
return await fn.apply(this, arguments);
Expand All @@ -194,8 +200,14 @@ function instrumentWait<F: (...any) => Promise<any>>(fn: F, name?: string): F {
if (!enabled) {
return fn;
}
/* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.99 was deployed. To see the error, delete this comment
* and run Flow. */
const profileName = name || fn.displayName || fn.name;
const instrumented = async function() {
/* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.99 was deployed. To see the error, delete this
* comment and run Flow. */
const traceId = startWait(profileName);
try {
return await fn.apply(this, arguments);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ function intersectionTypeAnnotation(types: Array<BabelAST>): BabelAST {
}

function lineComments(...lines: Array<string>): Array<$FlowFixMe> {
/* $FlowFixMe(>=0.70.0) This comment suppresses an error found when
* Flow v0.70 was deployed. To see the error delete this comment and
* run Flow. */
return lines.map(line => ({type: 'CommentLine', value: ' ' + line}));
}

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3213,10 +3213,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"

flow-bin@^0.98.0:
version "0.98.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.98.0.tgz#3361a03682326a83a5f0a864749f4f7f0d826bce"
integrity sha512-vuiYjBVt82eYF+dEk9Zqa8hTSDvbhl/czxzFRLZm9/XHbJnYNMTwFoNFYAQT9IQ6ACNBIbwSTIfxroieuKja7g==
flow-bin@^0.99.0:
version "0.99.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.99.1.tgz#0d4f413ca84a3a95d0aa64214178684dd7c6a4c5"
integrity sha512-dipNwJlb4MsVt3IuDgPTymCNL4GFoq3pG+GbY6DmBbl0dJPWFSA383rCTmgbfFhoeJ1XCfYBan0BPryToSxiiQ==

flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
version "1.0.3"
Expand Down

0 comments on commit 6ba5890

Please sign in to comment.