facebook Github contribution chart
facebook Github Stats
facebook Most Used Languages

Activity

29 Sep 2022

Github-actions

Deploying to gh-pages from @ 74630847604f1685e7f64669eaa89b190cf4ce31 🚀

Pushed On 29 Sep 2022 at 06:46:05
Issue Comment

Facebook-github-bot

Implement rusty Result monad in Ax

Summary: See https://doc.rust-lang.org/std/result/enum.Result.html .

In Ax we want a more structured way to deal with errors generated in code we dont necessarily control (data fetching, botorch, etc) than the pythonic try/except pattern was affording us. This Result implementation will encode whether a value is at risk of having failed in the type system and enfore that we handle cases where we don't have a value at consumption time.

Differential Revision: D39938559

Forked On 29 Sep 2022 at 06:44:46

Facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D39938559

Commented On 29 Sep 2022 at 06:44:46
Issue Comment

Riversand963

Manual flush with `wait=false` should not stall when writes stopped

When FlushOptions::wait is set to false, manual flush should not stall forever.

If the database has already stopped writes, then the thread calling DB::Flush() with FlushOptions::wait=false should not enter the DBImpl::write_thread_.

To prevent this, we should do a check at the beginning and return TryAgain()

Resolves: #9892

Forked On 29 Sep 2022 at 06:44:12

Riversand963

Thanks @siying for the review!

Commented On 29 Sep 2022 at 06:44:12
Pull Request

Mpolson64

Implement rusty Result monad in Ax

Created On 29 Sep 2022 at 06:43:59

Tyao1

Flow: remove max_workers setting

This was added back in #17880 to make CI pass for an unrelated change.

This limits the max worker setting to CI environments as removing the setting completely still seems to break on CircleCI.

Merged On 29 Sep 2022 at 06:43:50

Tyao1

noice!

Commented On 29 Sep 2022 at 06:43:50
Issue Comment

Facebook-github-bot

Manual flush with `wait=false` should not stall when writes stopped

When FlushOptions::wait is set to false, manual flush should not stall forever.

If the database has already stopped writes, then the thread calling DB::Flush() with FlushOptions::wait=false should not enter the DBImpl::write_thread_.

To prevent this, we should do a check at the beginning and return TryAgain()

Resolves: #9892

Forked On 29 Sep 2022 at 06:43:49

Facebook-github-bot

@riversand963 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Commented On 29 Sep 2022 at 06:43:49
Issue Comment

S-chand

[Bug]: await expect.rejects.toThrowError() does not work properly with custom error

Version

v28.1.3

Steps to reproduce

Reproduce: just run the following:

class SomeCustomErrorClass {}

class SomeCustomErrorClassExtendsError extends Error {}

// WORKS!
// case 1
describe("Regular error validation with error extends Error class", () => {
    it("validate throws", () => {
        const fun = () => {
            throw new SomeCustomErrorClassExtendsError();
        };

        expect(fun).toThrowError();
    });
});

// WORKS!
// case 2
describe("Regular error validation with error not extends Error class", () => {
    it("validate throws", () => {
        const fun = () => {
            throw new SomeCustomErrorClass();
        };

        expect(fun).toThrowError();
    });
});

// WORKS!
// case 3
describe("async error validation with error extends Error", () => {
    it("validate throws", async () => {
        const fun = async () => {
            await Promise.resolve();
            throw new SomeCustomErrorClassExtendsError("");
        };

        await expect(fun).rejects.toThrowError();
    });
});

// FAILS!
// case 4
describe("async error validation with error not extends Error", () => {
    it("validate throws", async () => {
        const fun = async () => {
            await Promise.resolve();
            throw new SomeCustomErrorClass();
        };

        await expect(fun).rejects.toThrowError();
    });
}); 

The bug is in the last test name: "async error validation with error not extends Error"

Expected behavior

I expect the async case to behave as sync and await expect(fun).rejects.toThrowError(); to work in the last test case

Actual behavior

 expect(received).rejects.toThrowError()

 Received function did not throw 

The test fails

Additional context

No response

Environment

System:
    OS: macOS 11.3.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    npm: 8.11.0 - /usr/local/bin/npm
  npmPackages:
    jest: v28.1.3 => 28.1.3 

Forked On 29 Sep 2022 at 06:43:00

S-chand

I've tried navigating this and was about to create a similar ticket. Custom Errors in Async contexts don't work for Jest. The details in the above issue are exactly as mine are set up, including the jest version

Commented On 29 Sep 2022 at 06:43:00

Riversand963

Manual flush with `wait=false` should not stall when writes stopped

When FlushOptions::wait is set to false, manual flush should not stall forever.

If the database has already stopped writes, then the thread calling DB::Flush() with FlushOptions::wait=false should not enter the DBImpl::write_thread_.

To prevent this, we should do a check at the beginning and return TryAgain()

Resolves: #9892

Merged On 29 Sep 2022 at 06:42:52

Riversand963

Commented On 29 Sep 2022 at 06:42:52

Riversand963

Manual flush with `wait=false` should not stall when writes stopped

When FlushOptions::wait is set to false, manual flush should not stall forever.

If the database has already stopped writes, then the thread calling DB::Flush() with FlushOptions::wait=false should not enter the DBImpl::write_thread_.

To prevent this, we should do a check at the beginning and return TryAgain()

Resolves: #9892

Forked On 29 Sep 2022 at 06:42:51

Riversand963

Done
On 29 Sep 2022 at 06:42:51
Issue Comment

Facebook-github-bot

Manual flush with `wait=false` should not stall when writes stopped

When FlushOptions::wait is set to false, manual flush should not stall forever.

If the database has already stopped writes, then the thread calling DB::Flush() with FlushOptions::wait=false should not enter the DBImpl::write_thread_.

To prevent this, we should do a check at the beginning and return TryAgain()

Resolves: #9892

Forked On 29 Sep 2022 at 06:42:14

Facebook-github-bot

@riversand963 has updated the pull request. You must reimport the pull request before landing.

Commented On 29 Sep 2022 at 06:42:14

Pmenichelli

started

Started On 29 Sep 2022 at 06:39:49

Sanchezzzs

started

Started On 29 Sep 2022 at 06:38:55
Issue Comment

Aigoncharov

After migrating to esbuild HMR no longer works on local dev plugins

Previously we use getWatchFolders for Metro to ensure local dev plugin projects are watched when running with the fast-refresh flag. After migrating to esbuild we lose this feature, and while developing local dev plugins, we would need to refresh the flipper manually and lose all the states.

Forked On 29 Sep 2022 at 06:38:39

Aigoncharov

This might be a good place to start https://github.com/facebook/react/issues/16604#issuecomment-528663101

Commented On 29 Sep 2022 at 06:38:39

Rixtrayker

started

Started On 29 Sep 2022 at 06:38:08

Lunaleaps

rework the community section of the website

Now that the work on the showcase has seen good progress (and that it's hackathon week at MSFT), I decided to go back to another white whale of mine on the website and take a stab at the community section.

This PR is fairly big, taking the existing single page, splitting it into multiple, updating and enhancing its content (used as inspiration my community map ) and adding it back to the header - while also tweaking the footer.

I think this will need to pass a few review rounds but overall I think this is a pretty good place to start a rework for the community section on the website :)

One thing that I deliberately not added to any of the pages, right now, are podcasts and newsletters - but I think that maybe they should be there, in the staying up to date section; let me know your thoughts.

Forked On 29 Sep 2022 at 06:36:06

Lunaleaps

Wow thanks for doing that! I think I do prefer that as it's easier to scroll through on mobile. @Simek do you have a preference as a tie-breaker?

Commented On 29 Sep 2022 at 06:36:06
Issue Comment

Serveroid

com.facebook.react.modules.core.ExceptionsManagerModule.reportException (ExceptionsManagerModule.java:79)

Description

Hi,

In Android the app randomly crashing with the below error. Got this in firebase crashlytics dashboard and there is no log to debug and reproduce. and We see this crash mostly happens on Samsung devices.

Fatal Exception: com.facebook.react.common.JavascriptException TypeError: null is not an object (evaluating 'U.networkType.value'), stack: onValueChange@1368:4730 onPress@954:1602 onPress@229:1700 value@225:7540 value@225:6753 onResponderRelease@225:5556 b@99:1125 S@99:1268 w@99:1322 R@99:1617 M@99:2401 forEach@-1 U@99:2201 @99:13818 Pe@99:90199 Re@99:13478 Ie@99:13664 receiveTouches@99:14448 value@40:3544 @40:840 value@40:2798 value@40:812 value@-1

Below are the dependencies.

"@burstware/react-native-portal": "^1.0.2", "@react-native-community/async-storage": "^1.9.0", "@react-native-community/datetimepicker": "3.0.0", "@react-native-community/geolocation": "^2.0.2", "@react-native-community/masked-view": "^0.1.7", "@react-native-community/netinfo": "^5.9.5", "@react-native-community/progress-bar-android": "^1.0.3", "@react-native-community/progress-view": "@1.1.1", "@react-native-firebase/analytics": "^7.4.2", "@react-native-firebase/app": "^8.3.1", "@react-native-firebase/crashlytics": "^8.3.3", "@react-navigation/bottom-tabs": "5.2.6", "@react-navigation/drawer": "5.0.5", "@react-navigation/material-bottom-tabs": "5.1.7", "@react-navigation/material-top-tabs": "5.1.7", "@react-navigation/native": "5.1.4", "@react-navigation/native-stack": "5.0.5", "@react-navigation/stack": "5.2.9", "android": "^0.0.8", "axios": "^0.19.2", "format-string-by-pattern": "^1.2.1", "jail-monkey": "^2.3.2", "jsc-android": "^245459.0.0", "moment": "^2.24.0", "patch-package": "^6.4.7", "prop-types": "^15.7.2", "react": "16.11.0", "react-native": "0.62.1", "react-native-add-calendar-event": "3.0.2", "react-native-awesome-card-io": "^0.8.3", "react-native-background-timer": "^2.2.0", "react-native-collapsible": "^1.5.2", "react-native-config": "1.3.3", "react-native-device-info": "^5.6.1", "react-native-document-picker": "^4.1.0", "react-native-easy-toast": "^1.2.0", "react-native-exit-app": "^1.1.0", "react-native-fs": "2.16.6", "react-native-gesture-handler": "1.8.0", "react-native-get-random-values": "^1.4.0", "react-native-htmlview": "^0.15.0", "react-native-image-base64": "0.1.4", "react-native-image-picker": "2.3.1", "react-native-image-resizer": "1.2.3", "react-native-image-zoom-viewer": "3.0.1", "react-native-in-app-review": "^2.1.5", "react-native-languages": "^3.0.2", "react-native-linear-gradient": "^2.5.6", "react-native-localization": "^2.1.6", "react-native-map-clustering": "^3.3.4", "react-native-maps": "^0.27.1", "react-native-modal": "^11.5.6", "react-native-orientation-locker": "^1.0.21", "react-native-pdf": "^6.2.0", "react-native-permissions": "2.1.4", "react-native-picker-select": "^6.6.0", "react-native-rate": "^1.2.1", "react-native-reanimated": "^1.8.0", "react-native-safe-area-context": "^0.7.3", "react-native-screens": "@2.4.0", "react-native-share": "^5.1.0", "react-native-signature-capture": "^0.4.11", "react-native-snap-carousel": "^3.9.0", "react-native-splash-screen": "^3.2.0", "react-native-sqlite-storage": "https://github.com/leorajdsouza/react-native-sqlite-storage.git", "react-native-svg": "^12.1.0", "react-native-tab-view": "2.13.0", "react-native-touch-id": "^4.4.1", "react-native-user-inactivity": "^1.1.0", "react-native-vector-icons": "6.6.0", "react-native-webview": "~9.1.4", "react-redux": "^7.2.0", "reanimated-bottom-sheet": "^1.0.0-alpha.19", "redux": "^4.0.5", "redux-logger": "^3.0.6", "redux-thunk": "^2.3.0", "rn-fetch-blob": "^0.12.0", "rn-secure-storage": "^2.0.4", "underscore": "^1.12.0"

Any solution??

Version

0.62.1

Output of npx react-native info

No response

Steps to reproduce

Got it in Firebase Crashlytics.

Snack, code example, screenshot, or link to a repository

No response

Forked On 29 Sep 2022 at 06:32:05

Serveroid

The same issue, any solutions?

Commented On 29 Sep 2022 at 06:32:05

Morad-T

started

Started On 29 Sep 2022 at 06:30:34

PericlesDev

Easy to maintain open source documentation websites.

Forked On 29 Sep 2022 at 06:27:51

Facebook-github-bot

Improve naming in time computation

Summary: This code is similar to code in DateUtil.cpp (and was probably originally copied from there), but performs a different task (this computes the time offset with DST included, DateUtil.cpp computes the time offset without DST included).

Make the naming clearer: this code computes the full offset from GMT to local time (including timezone offset and daylight savings offset).

No functional change intended.

Reviewed By: jpporto

Differential Revision: D39859314

fbshipit-source-id: 791b80ce5bdaa335c495677d22e85efd65f1f381

Pushed On 29 Sep 2022 at 06:27:47

Facebook-github-bot

Clean useless experiment code

Summary:

Context

This experiment is to verify if we can fix this ANR. However, the result shows that it doesn't help too much.

After checking the code from product team again, using both setComponentAsync and setComponentAsync should be the root cause. This issue has been fixed in D39552914, which has mitigated the issue a lot.

This diff is to clean the useless code, should not affect any existing logic.

Reviewed By: adityasharat

Differential Revision: D39928737

fbshipit-source-id: e38d350204b9b3a3527ba05ec468ca2a1ef30868

Pushed On 29 Sep 2022 at 06:27:22

Facebook-github-bot

Fix task number in comment

Summary: The task number pasted in the comment was the wrong one...

Reviewed By: beicy

Differential Revision: D39912020

fbshipit-source-id: c28622586922afa4dff0171aea1f1151791ee71b

Pushed On 29 Sep 2022 at 06:27:11

Lanegoolsby

feat (plugin-gtag): Adding useGoogleAnalytics hook

Pre-flight checklist

  • [x] I have read the Contributing Guidelines on pull requests.
  • [ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • [ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

This exposes a React hook that allows for programmatically sending custom events to Google Analytics.

Test Plan

Temporarily added a button to the home page with a onClick that called the hook.

//snip
import { useGoogleAnalytics, type Event } from '@docusaurus/plugin-google-gtag';
//snip

function HeroBanner() {
  const { sendEvent } = useGoogleAnalytics();

  function onClick() {
    const event: Event = {
      action: 'some action',
      event_category: 'come category',
      event_label: 'some label',
      value:'some value'
    }
    sendEvent(event)
  }

  return (
    <div className={styles.hero} data-theme="dark">
      <div className={styles.heroInner}>
        <button type='button' onClick={onClick}><Translate>Click me</Translate></button> 

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

Forked On 29 Sep 2022 at 06:25:09

Lanegoolsby

They can, I'm just an old school OOO programmer and will always provide strong types. :)
On 29 Sep 2022 at 06:25:09

Lanegoolsby

feat (plugin-gtag): Adding useGoogleAnalytics hook

Pre-flight checklist

  • [x] I have read the Contributing Guidelines on pull requests.
  • [ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • [ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

This exposes a React hook that allows for programmatically sending custom events to Google Analytics.

Test Plan

Temporarily added a button to the home page with a onClick that called the hook.

//snip
import { useGoogleAnalytics, type Event } from '@docusaurus/plugin-google-gtag';
//snip

function HeroBanner() {
  const { sendEvent } = useGoogleAnalytics();

  function onClick() {
    const event: Event = {
      action: 'some action',
      event_category: 'come category',
      event_label: 'some label',
      value:'some value'
    }
    sendEvent(event)
  }

  return (
    <div className={styles.hero} data-theme="dark">
      <div className={styles.heroInner}>
        <button type='button' onClick={onClick}><Translate>Click me</Translate></button> 

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

Merged On 29 Sep 2022 at 06:25:10

Lanegoolsby

Commented On 29 Sep 2022 at 06:25:10

React-native-bot

Replace Toast with Log.w on ReactImageView when null URL specified

Summary: This is crashing on A12 because of using the regular Context instead of the application context. That said, this probably makes more sense as a log warning.

Reviewed By: javache

Differential Revision: D39852058

Changelog

[Android][Changed] - Replaces a Toast warning with a Log warning on ReactImageView to prevent a crash on A12.

Forked On 29 Sep 2022 at 06:25:06

React-native-bot

This pull request was successfully merged by Christopher Jones in 30411ae1a42e46d0e5a2da494a39ed2767ba8808.

When will my fix make it into a release? | Upcoming Releases

Commented On 29 Sep 2022 at 06:25:06

Facebook-github-bot

fbandroid/libraries/fresco/imagepipeline-base/src/main/java/com/facebook/imagepipeline/transcoder/ImageTranscodeResult.java

Reviewed By: oprisnik

Differential Revision: D39808869

fbshipit-source-id: 74b161564977e0a6115987f1e3a12cb513952419

Pushed On 29 Sep 2022 at 06:24:46

Facebook-github-bot

Class for PortRIF neighbors

Summary: Towards adding PortRIF neighbors, create a class modeling this abstraction

Reviewed By: phshaikh

Differential Revision: D39867039

fbshipit-source-id: a81c1a5e75acf2eebb3aa8edf11661d3fceb84be

Pushed On 29 Sep 2022 at 06:23:53

Facebook-github-bot

SaiNeighborEntry - a wrapper around vlan and port rif neighbors

Summary: As titled

Reviewed By: phshaikh

Differential Revision: D39872839

fbshipit-source-id: 351ef460758853fabc8fe3d0c1ba4d3db3705bce

Pushed On 29 Sep 2022 at 06:23:53

Facebook-github-bot

API to get rif type associated with nbr entry

Summary: As titled

Differential Revision: D39875787

fbshipit-source-id: 6ad56a2fbbab10dafe885ac2b212ac0a79145a04

Pushed On 29 Sep 2022 at 06:23:53

Facebook-github-bot

Start creating port rif neighbor entries

Summary: Use the SaiNeighborEntry wrapper to create VLAN or PORT RIF neighbors (depending on the underlying rif type).

Reviewed By: phshaikh

Differential Revision: D39873846

fbshipit-source-id: 387ce1032ef08a9554dc5c8a28e9a7708fc466ba

Pushed On 29 Sep 2022 at 06:23:53

Facebook-github-bot

Updating submodules

Summary: GitHub commits:

https://github.com/facebook/fbthrift/commit/41a41a9072cdf06aec5b5cccda87cc7ea6190c65 https://github.com/facebook/litho/commit/a81fed81cb2d772cda1f0061aecb09c534fe2c89

Reviewed By: bigfootjon

fbshipit-source-id: 5fe9e0872db3ab60029990d51be9617b087cf473

Pushed On 29 Sep 2022 at 06:23:53

Facebook-github-bot

Replace Toast with Log.w on ReactImageView when null URL specified

Created On 29 Sep 2022 at 06:23:21

Facebook-github-bot

Replace Toast with Log.w on ReactImageView when null URL specified (#34819)

Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34819

This is crashing on A12 because of using the regular Context instead of the application context. That said, this probably makes more sense as a log warning.

Reviewed By: javache

Differential Revision: D39852058

fbshipit-source-id: 1ac93f8cc9ecdb14f60baca175c8ecff2ff42ac0

Pushed On 29 Sep 2022 at 06:23:19

Facebook-github-bot

Convert FBSDKBridgeAPI.h/m to Swift

Summary: This is a first pass to translate it as accurately as possible without regressing anything.

Reviewed By: samodom

Differential Revision: D39745967

fbshipit-source-id: 0113836e41adcda9198f4d14515931310454d7e1

Pushed On 29 Sep 2022 at 06:23:00

Facebook-github-bot

Remove unused fbsdkdfl_ASWebAuthenticationSessionClass methods

Summary: SFAuthenticationSession was deprecated with iOS 12 and its code was removed in a prior commit (D39696900 (https://github.com/facebook/facebook-ios-sdk/commit/9d9d5b5b0bea5476824ebf4ed92267f5f20b8b2d)). These methods are no longer used.

Reviewed By: joesus

Differential Revision: D39899893

fbshipit-source-id: 2af785723f291c9d72862ee5cdb1f061cfcbeda7

Pushed On 29 Sep 2022 at 06:23:00

Facebook-github-bot

Add implicit instantiation results to speculating calls

Summary: We now support adding annotations to implicit instantiations encountered during speculation. See the added test case.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D39933044

fbshipit-source-id: 154dfe7353487cc46d0b38c2ac68aa075a2d012d

Pushed On 29 Sep 2022 at 06:22:57

Facebook-github-bot

Constructor support in implicit instantiation codemod

Summary: We now support annotating new expressions in the codemod

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D39934390

fbshipit-source-id: 40bf82d5ddcd00986a30648bc5eb2e49f7abccb1

Pushed On 29 Sep 2022 at 06:22:57