Commit Graph

3704 Commits

Author SHA1 Message Date
Anton Nikolaev
a2e77f5da0 Patch metro to avoid erasing "process" global var
Summary:
Patch for "metro" to avoid erasing of "process" global var during bundling.

Also removed "process" babel transform for main Electron process which was also made to workaround the same issue with "process" being erased.

Reviewed By: mweststrate

Differential Revision: D22389153

fbshipit-source-id: 569882e20534eedfca45509b8efe0186d335c681
2020-07-06 03:09:41 -07:00
Luc Oth
7c3d264803 ManagedTable: pass an innerRef to bypass debounceRender
Summary: The ref would point to the DebouncedComponent instead of the ManagedTable passing an innerRef and handling binding manually.

Reviewed By: mweststrate

Differential Revision: D22374912

fbshipit-source-id: d404931405939ef8bfbde31f9aec7d531a3b62e3
2020-07-03 09:34:43 -07:00
Pascal Hartig
51e7ce3566 Fragment sample test (#1328)
Summary:
Wanted to have a way to test fragment support in open source for https://github.com/facebook/flipper/issues/1209.

Stacked on https://github.com/facebook/flipper/issues/1327.
Pull Request resolved: https://github.com/facebook/flipper/pull/1328

Test Plan: ![Screenshot 2020-07-02 12 10 17](https://user-images.githubusercontent.com/9906/86352544-dc2ae300-bc5d-11ea-91f8-f6b06437f7bc.png)

Reviewed By: jknoxville

Differential Revision: D22356283

Pulled By: passy

fbshipit-source-id: 2ad84df0aae85634c8245e71f18b803ce8dd6ca0
2020-07-03 04:02:31 -07:00
Pascal Hartig
74c9f8ea33 Upgrade gradle and gradle plugin (#1327)
Summary:
Android Studio is on 4.0 now, we need the plugin for proper support.
Pull Request resolved: https://github.com/facebook/flipper/pull/1327

Test Plan: Synced and build with it.

Reviewed By: nikoant

Differential Revision: D22356268

Pulled By: passy

fbshipit-source-id: 63c7b727e9a0eaaea7beed1f9819c1e2d15a0ff4
2020-07-02 11:15:09 -07:00
Anton Nikolaev
a8a16e24b3 Set exit code to 1 if script failed
Summary: Fixed scripts to return exit code 1 in case of error.

Reviewed By: passy

Differential Revision: D22357664

fbshipit-source-id: 1e067fe507e8f33cf21e70f3d15fd97175b9544e
2020-07-02 10:20:36 -07:00
Anton Nikolaev
70b87b70c7 Fix standalone package build for unity plugins
Summary: Fixed error on building standalone packages for "unity" apps. The error was because "immer" imports were not transformed to use "immer" from Flipper bundle.

Reviewed By: passy

Differential Revision: D22357571

fbshipit-source-id: 590321f36208c9ed02d56d2c0c085c7cd1878018
2020-07-02 10:20:36 -07:00
Richard Zadorozny
91cccbe436 Sonar tag for skipping empty view groups in layout target mode
Summary:
I think it's somewhat common to have large containers that can hold future views, especially fragments. The problem is the presence of these containers can block the layout inspector's "target" mode.

I found out from cekkaewnumchai that Flipper does in fact return multiple results from the pick, but I think it could still be helpful to have this new tag since it is more convenient than having to do the secondary drill down each time.

Reviewed By: jknoxville

Differential Revision: D22284972

fbshipit-source-id: 1a2826ec746e4f31690db33ed72815ae168bffab
2020-07-02 08:39:35 -07:00
Joao Alves
51e37311d0 Fix: Release builds on android (#1325)
Summary:
After `react-native-flipper` 0.48.0 I cannot build releases on android (I think that passed on CI tests because the example was running an older version of this package, 0.47.0).
So I moved all the `android/src/main` content to `android/src/debug` because we will not use Flipper in another Build Variant

## Changelog

I moved all content from `react-native-flipper/android/src/main` to `react-native-flipper/android/src/debug`.

Probably solves https://github.com/facebook/flipper/issues/1303
Pull Request resolved: https://github.com/facebook/flipper/pull/1325

Test Plan: Maybe create a custom CI script to verify if Flipper deps are present on Release Builds, [something like this](https://github.com/facebook/flipper/issues/1274#issue-641197153)

Reviewed By: cekkaewnumchai

Differential Revision: D22333432

Pulled By: passy

fbshipit-source-id: 4abbab5ecbe08d44752b2138569ff60d25724087
2020-07-02 04:07:59 -07:00
Anton Nikolaev
228d09d572 Script for resolving plugin directory by its package name
Summary:
Changed "build-plugin" script to allow triggering release by plugin name (required to enable triggering releases by button in Marketplace):
1) Added new script to resolve plugin dir by name
2) Allow passing either plugin dir or name to "build-plugin" script

Reviewed By: passy

Differential Revision: D22354643

fbshipit-source-id: b7aca57acefc81ca0b6d9c7f359f63d8f0599e39
2020-07-02 02:48:19 -07:00
Adam Ernst
b11082d229 Don't show accessibilityComponentAction in Flipper
Summary: This field is going to be removed in a subsequent version of the struct. Showing it is not that important, so let's just remove it.

Reviewed By: kevin0571

Differential Revision: D22335170

fbshipit-source-id: 0916927ee30757678f847cd0f826caa1d4a6c7cc
2020-07-01 14:54:49 -07:00
Kevin Lin
29c85e672b Rename CKComponentLayout to CKLayout
Summary:
Rename `CKComponentLayout` to `CKLayout`
#nocancel

Reviewed By: adamjernst

Differential Revision: D22332214

fbshipit-source-id: 8845f2b313e214cd7892199bf0c40341c88a595a
2020-07-01 11:59:41 -07:00
Paco Estevez Garcia
d871ce0a04 Extract TouchOverlayView to new class
Summary:
Before this diff, `TouchOverlayView` would be an inner non-static class,so it'd be difficult to track memory ownership for it.

It also made `InspectorFlipperPlugin` longer and harder to read.

Reviewed By: cekkaewnumchai

Differential Revision: D22285744

fbshipit-source-id: 6fdd8c33a07be6ab900ebb28a8c3ebf3761fb598
2020-07-01 11:05:46 -07:00
Paco Estevez Garcia
c1d9527406 Fix potential nullable accesss
Summary:
While ramping up to Flipper I found this potential NPE caused by ordering issues.

There are only 3 uses downstream that don't use a constant that's part of the default initializer.
```
λ festevezga-mbp xplat → buck build sonar/android/src/main/java/com/facebook/flipper/plugins/inspector/... 2>&1 | rg ' = descriptorForClass' | awk '{$1=$1};1' | sort | uniq -c
   5 NodeDescriptor descriptor = descriptorForClass(Object.class);
   3 NodeDescriptor descriptor = descriptorForClass(View.class);
   1 NodeDescriptor descriptor = descriptorForClass(node.getClass());
   2 final NodeDescriptor descriptor = descriptorForClass(Dialog.class);
  12 final NodeDescriptor descriptor = descriptorForClass(Fragment.class);
   5 final NodeDescriptor descriptor = descriptorForClass(Object.class);
  26 final NodeDescriptor descriptor = descriptorForClass(View.class);
   2 final NodeDescriptor descriptor = descriptorForClass(Window.class);
   1 final NodeDescriptor descriptor = descriptorForClass(node.getClass());
   1 final NodeDescriptor descriptor = descriptorForClass(topChild.getClass());
   2 final NodeDescriptor objectDescriptor = descriptorForClass(Object.class);
```

Reviewed By: muraziz

Differential Revision: D22284669

fbshipit-source-id: b41c8d78c70c5b5acdc08aa6f0e7afa681f4242d
2020-07-01 11:05:46 -07:00
Michel Weststrate
babc88e472 Convert Seammammals plugin to Sandy {emoji:1f389}
Summary:
Converted the Seammammals plugin to use Sandy plugin infra (but the old components). Also updated lock file.

Added unittests have been added as well. The UI snapshots in there are kinda overkill, but nice demo that it works.

This completes the full roundtrip of the new Sandy infra, so this will be the last diff of this stack. I promise. I think.

Reviewed By: nikoant

Differential Revision: D22308265

fbshipit-source-id: 260e91a1951d486f6689880fe25281e80a71806a
2020-07-01 09:12:37 -07:00
Michel Weststrate
581ddafd18 Fixed re-enabling a still selected plugin
Summary: While testing manually discovered the sandy plugin infra din't cover the case that a plugin can be selected but not enabled at the same time. Added test and fixed that.

Reviewed By: nikoant

Differential Revision: D22308597

fbshipit-source-id: 6cef2b543013ee81cee449396d523dd9a657ad1c
2020-07-01 09:12:37 -07:00
Michel Weststrate
d16c6061c1 Introduce createState which can be used in components to propagate updates
Summary:
Introduced a minimal state abstraction so that state can be maintained in the plugin instance, but subscribe to by the UI.

At a later point we could pick an off the shelve solution like Recoil or MobX, or introduce cursors to read something deep etc etc, but for now that doesn't seem to be needed at all, and I think this will be pretty comprehensible for plugin authors (see also the 25th diff in this stack).

The api

```
createState(initialValue): Atom

Atom {
   get() // returns current value
   set(newValue) // sets a new value
   update(draft => { }) // updates a complex value using Immer behind the scenes
}

// hook, subscribes to the updates of the Atom and always returns the current value
useValue(atom)
```

Reviewed By: nikoant

Differential Revision: D22306673

fbshipit-source-id: c49f5af85ae9929187e4d8a051311a07c1b88eb5
2020-07-01 09:12:37 -07:00
Michel Weststrate
159c0deaf1 Added usePlugin hooks
Summary:
`usePlugin(pluginFactory)` returns the current plugin instance's api that was exposed by the plugin directory.

Passing `pluginFactory` is technically strictly not needed, but having the user pass it, we can make sure it is strongly typed

Reviewed By: nikoant

Differential Revision: D22286293

fbshipit-source-id: 4268b6849b8cd3d524103de7eadbd6c0a65c7a61
2020-07-01 09:12:37 -07:00
Michel Weststrate
952e929699 Fix disabling a plugin nog clearing the message queue
Summary:
While writing unit tests discovered a bug that disabling a plugin doesn't guarantee cleaning the messagequeues (both the buffer in client and the messagequeue reducer).

Fixed that. That was thanks to @#%@#$@#%@ Redux a lot harder than it should be; as 'STAR_PLUGIN' reasons about a plugin + app name, while the message queue reducer would need to deduct the plugin keys from that, but it can't because that mapping is stored in the connections reducers. So I moved the `STAR_PLUGIN` action handling to the root reducer, sot that it can reason about the state of multiple reducers, which looked like the least of all evils. For more ranting about that and possible alternative solutions: https://twitter.com/mweststrate/status/1277556309706117122

Reviewed By: nikoant

Differential Revision: D22284043

fbshipit-source-id: 35d0a8ba3a21a5959d2bb6ef17da3ff5077f48fd
2020-07-01 09:12:36 -07:00
Michel Weststrate
bb0c8e0df0 Support receiving messages in Sandy plugins
Summary: This diffs adds the capability to listen to messages in Sandy plugins. Although API wise it looks more like the old `this.subscribe`, semantically it behaves like the `persistedStateReducer`; messages are queued if the plugin is enabled but not active.

Reviewed By: nikoant

Differential Revision: D22282711

fbshipit-source-id: 885faa702fe779ac8d593c1d224b2be13e688d47
2020-07-01 09:12:36 -07:00
Michel Weststrate
6c79408b0f Move plugin stats to their own file
Summary: Really nothing interesting to see here , just moved pluginStats out of messageQueue, as it started there and kept growing

Reviewed By: nikoant

Differential Revision: D22257318

fbshipit-source-id: 26be7efb4629fcef1b14de96a2b60f17f7d76785
2020-07-01 09:12:36 -07:00
Michel Weststrate
ec85dd5b01 Allow plugins to send messages
Summary: Sandy plugins can now send messages to plugins. The methods and params are strongly typed in implementation and unit tests, based on the <Methods> generic of FlipperClient.

Reviewed By: nikoant

Differential Revision: D22256972

fbshipit-source-id: 549523a402949b3eb6bb4b4ca160dedb5c5e722d
2020-07-01 09:12:36 -07:00
Michel Weststrate
8b2d8498e6 Upgrade to TypeScript 3.9
Summary:
Upgrading to TypeScript 3.9 so that we can use `// ts-expect-error`, that allows us to basically write unit tests for typings.

Fixed the typescript path in `settings.json`, because otherwise VSCode kept picking the built-in version (3.8.3 atm) of ts when opening the `sonar` folder as workspace.

Reviewed By: passy

Differential Revision: D22255818

fbshipit-source-id: ae54aedb237445f32f1797b4290656dbfb0e528f
2020-07-01 09:12:36 -07:00
Michel Weststrate
df6a8cd031 Provide initial plugin test infra for plugin devs
Summary:
This sets up the initial infra that is to be used by plugin devs to test plugins.

There is not much yet to see, as there is no state or message sending yet. But at least the life cycle of plugins can be test, things are strongly typed and everything is in the place where it should be :)

N.b. the import difference with these utils and the createFlipperMock utilities in Flipper are

1. this testing infra is entirely inside flipper-plugin package, so that plugin devs don't need flipper as a dependency
2. this testing infra doesn't provide abstractions for plugin / device / client switching; it tests plugins purely in isolation of the rest of the world (except for firing `onConnect` / `onDisconnect` which is normally the effect of switching plugins)

Reviewed By: nikoant

Differential Revision: D22255262

fbshipit-source-id: b94ccbab720d2b49428a646aed3c55af71a5bc80
2020-07-01 09:12:36 -07:00
Michel Weststrate
c902a27bce Add Sandy to internal documentation
Summary:
Scaffolded some internal Sandy notes and made them only internally available.

Since most of the pipeline was already set up by jknoxville, it is unclear to me if something needs to be done to set up the auto redirect from fbflipper.com

Reviewed By: jknoxville

Differential Revision: D22233534

fbshipit-source-id: 4bdf5535f5745e7e4d335647759c6cf1b7cc73c6
2020-07-01 09:12:36 -07:00
Michel Weststrate
bde112bf85 Introduce onConnect / onDisconnect hooks
Summary:
Introduced hooks that are called whenever the plugin is connected / disconnected to it's counter part on the device.

There is some logic duplication between `PluginContainer` for old plugins, and `PluginRenderer` for new plugins, mostly caused by the fact that those lifecycles are triggered from the UI rather than from the reducers, but I figured refactoring that to be too risky.

Reviewed By: jknoxville

Differential Revision: D22232337

fbshipit-source-id: a384c45731a4c8d9b8b532a83e2becf49ce807c2
2020-07-01 09:12:36 -07:00
Michel Weststrate
dd0d957d8b Fix vscodeUtils make a request on every unit test run
Summary:
When running unit tests, every unit would try to make a graphql request (since promises always kick off immediately, even when not being awaited) and print an error. Fixed that by lazily choosing the preferred whatever it is.

Before:

{F241368814}

After:
(crickets)

Reviewed By: passy

Differential Revision: D22208422

fbshipit-source-id: b290d528d94dbed7ae867e07694d8d4cd85d8376
2020-07-01 09:12:36 -07:00
Michel Weststrate
f2c39aed55 Introduce PluginRenderer to render plugins
Summary: PluginContainer will now wrap Sandy plugins in PluginRenderer. PluginRenderer will also be used by plugin unit tests in the future

Reviewed By: jknoxville

Differential Revision: D22159359

fbshipit-source-id: 69f9c8f4bec9392022c1d7a14957f5aca0339d97
2020-07-01 09:12:36 -07:00
Michel Weststrate
ba01fa5bc9 Introduce onDestroy hook
Summary: This diff introduces the `onDestroy` hook that can be used by plugins to listen to the event where a plugin is cleaned up (either because it is disabled, or because the client is being cleaned up)

Reviewed By: jknoxville

Differential Revision: D22208121

fbshipit-source-id: 9c4951ae671be611f21da171c548d4054c481166
2020-07-01 09:12:35 -07:00
Michel Weststrate
04a29315e2 Remove instanceof checks
Summary: Replaced `instanceof` checks with `isSandyPlugin` utility. That is cleaner to read and makes it easier to find places where we make exceptions for Sandy plugins

Reviewed By: jknoxville

Differential Revision: D22206707

fbshipit-source-id: b44a1b585424f3b9bf0d7ce200c34107f03ed55e
2020-07-01 09:12:35 -07:00
Michel Weststrate
1dc9e899b8 Make sure Sandy plugis can be initialized
Summary:
This diff makes sure sandy plugins are initialized.

Sandy plugins are stored directly in the client for two reasons
1. we want to decouple any plugin state updates from our central redux store, as redux is particularly bad in handling high frequency updates.
2. The lifecycle of a plugin is now bound to the lifecycle of a client. This means that we don't need 'persistedStore' to make sure state is preserved; that is now the default. Switching plugins will no longer reinitialize them (but only run specific hooks, see later diffs).
3. PersistedState will be introduced for sandy plugins as well later, but primarily for import / export / debug reasons.

A significant difference with the current persistent state, is that if a client crashes and reconnects, plugins will loose their state. We can prevent this (again, since state persisting will be reintroduced), but I'm not sure we need that for the specific reconnect scenario. Because
1. we should fix reconnecting clients anyway, and from stats it looks to happen less already
2. reconnects are usually caused by plugins that aggregate a lot of data and get slower over time. Restoring old state also restores those unstabilites.

For the overview bringing back the archi picture of earlier diff:
{F241508042}

Also fixed a bug where enabling background plugins didn't enable them on all devices with that app.

Reviewed By: jknoxville

Differential Revision: D22186276

fbshipit-source-id: 3fd42b577f86920e5280aa8cce1a0bc4d5564ed9
2020-07-01 09:12:35 -07:00
Michel Weststrate
bf79c9472e Always mock FBLogger during unit tests
Summary: Unit tests tend to randomly bail out once FBLogger is (indirectly) required by some module under test. This makes sure FBLogger is stubbed by default. We might want to do the same for `User` in the future.

Reviewed By: jknoxville

Differential Revision: D22186274

fbshipit-source-id: 2ede364c4b691d69826781355592226b075d8367
2020-07-01 09:12:35 -07:00
Michel Weststrate
83e6968fa1 cleaner test API
Summary: The test mock utilities now return a promise, rather than taking a callback, which makes tests slightly nicer to read (similar to react-testing-library). No semantic changes.

Reviewed By: jknoxville

Differential Revision: D22186278

fbshipit-source-id: ec5b9f4e6bfeee9160e331f8c20a1d4fdcbfeede
2020-07-01 09:12:35 -07:00
Michel Weststrate
12ac29685d make sure plugins can be loaded into Flipper
Summary: Make sure Sandy plugins are loaded properly from disk

Reviewed By: jknoxville

Differential Revision: D22186275

fbshipit-source-id: fd2f560a7bed959b18e05db2a087909ad876ab9d
2020-07-01 09:12:35 -07:00
Michel Weststrate
1029a6c97c Introduce types for Sandy plugins through code base
Summary:
So far there were 2 types of plugins: `FlipperPlugin` and `FlipperDevicePlugin`. This introduces a third kind: `SandyPluginDefinition`.

Unlike with the old plugins, the export of the module is not directly exposed as the plugin definition. Rather, we use class `SandyPluginDefinition` (instance) that holds a loaded definition and its meta data separately (`PluginDetails`). This means that we don't have to mix in and mutate loaded definitions, and that for unit tests we can avoid needing to provide a bunch of meta data. This also prevents a bunch of meta data existing on two places: on the loaded classes as static fields, and in the meta data field of the loaded class as well. Finally, we can now freely extends the `PluginDetails` interface in flipper, without needing to store it on the loaded classes and we are sure that no naming conflicts are caused by this in the future.

For compatibility with the existing code base, common fields are delegated from the `SandyPluginDefinition` class to the meta data.

Also cleaned up types around plugins a little bit and removed some unnecessary casts.

For all features that reason about plugins in general (such as exports), sandy plugins are ignored for now.

`SandyPluginInstance` is worked out in further diffs

The `instanceof` calls are replaced by a utility function in later diffs.

{F241363645}

Reviewed By: jknoxville

Differential Revision: D22091432

fbshipit-source-id: 3aa6b12fda5925268913779f3c3c9e84494438f8
2020-07-01 09:12:35 -07:00
Michel Weststrate
845c9b67f5 Read flipper-plugin from peer deps
Summary:
To know whether plugins should be mounted with the old setup or new setup (with a Provided / context based api), we need to be able to recognize whether a plugin is written with the old or new setup.

We do this by checking if the flipper-plugin dependency is declared as peer dependency. This we can to check for SDK compatibility as well.

Reviewed By: jknoxville

Differential Revision: D22043085

fbshipit-source-id: 21afabb6e58d86253a464470f4690c51cced87ab
2020-07-01 09:12:35 -07:00
Michel Weststrate
2383dc85f8 Initialized flipper-plugin library
Summary: Set up an initial library which can (should) be used by plugins in the future.

Reviewed By: jknoxville

Differential Revision: D22019554

fbshipit-source-id: 502b14b34b2c9c117cea377ab6ebbf150e6faee9
2020-07-01 09:12:35 -07:00
Adam Ernst
993dbef7b8 Remove expensive operator== from CKViewConfiguration & AccessibilityContext
Summary:
`CKComponentAccessibilityContext::operator==` can be extremely expensive; it may invoke the `accessibilityLazyTextBlock` for its `CKComponentAccessibilityTextAttribute` members, and that can do a lot of string construction.

I could refactor this to make it cheaper, e.g. by migrating to a function-pointer-and-context-object approach. But the easiest thing to do is to simply remove it; I don't think it's meaningfully used.

Reviewed By: kevin0571

Differential Revision: D22322108

fbshipit-source-id: 82a0548d6dd28ec4adf2f3ba85705eabf665d100
2020-07-01 08:26:04 -07:00
dependabot[bot]
7e7f431c66 Bump electron-devtools-installer from 3.0.0 to 3.1.0 in /desktop (#1317)
Summary:
Bumps [electron-devtools-installer](https://github.com/MarshallOfSound/electron-devtools-installer) from 3.0.0 to 3.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/MarshallOfSound/electron-devtools-installer/releases">electron-devtools-installer's releases</a>.</em></p>
<blockquote>
<h2>v3.1.0</h2>
<h1><a href="https://github.com/MarshallOfSound/electron-devtools-installer/compare/v3.0.0...v3.1.0">3.1.0</a> (2020-06-27)</h1>
<h3>Features</h3>
<ul>
<li>add electron 9 support (<a href="https://github-redirect.dependabot.com/MarshallOfSound/electron-devtools-installer/issues/131">https://github.com/facebook/flipper/issues/131</a>) (<a href="ab713a639c">ab713a6</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f6932ad87d"><code>f6932ad</code></a> chore: fix tests</li>
<li><a href="ab713a639c"><code>ab713a6</code></a> feat: add electron 9 support (<a href="https://github-redirect.dependabot.com/MarshallOfSound/electron-devtools-installer/issues/131">https://github.com/facebook/flipper/issues/131</a>)</li>
<li>See full diff in <a href="https://github.com/MarshallOfSound/electron-devtools-installer/compare/v3.0.0...v3.1.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=electron-devtools-installer&package-manager=npm_and_yarn&previous-version=3.0.0&new-version=3.1.0)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1317

Reviewed By: mweststrate

Differential Revision: D22310350

Pulled By: passy

fbshipit-source-id: d043248ebd57976c5cfde267741977846c77c065
2020-07-01 06:11:35 -07:00
pyricau@users.noreply.github.com
cfd8662c12 Fix ApplicationWrapper activity weakRef leak (#1301)
Summary:
Fix for https://github.com/facebook/flipper/issues/1300

The weak refs were not being cleared in two cases:

- On config changes, isFinishing() would be false in onPause()
- When calling finish() from Activity.onCreate(), onPause() isn't guaranteed to be called.

## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/1301

Reviewed By: mweststrate

Differential Revision: D22286182

Pulled By: passy

fbshipit-source-id: 948d1d9b2145b6526c0030cf537330409ff7f8c4
2020-06-30 09:46:00 -07:00
Chaiwat Ekkaewnumchai
c8af6da236 Disable Web Security in Command Line
Summary:
We've disabled web security in `BrowserWindow` (https://fburl.com/diffusion/0l0q669m). However, there is a bug in Electron 9 that makes this doesn't work as expected (https://github.com/electron/electron/issues/23664). Earlier, we've resolved this problem by specifying `no-cors` mode in requests. This strikes again in other plugin.

This diff applies a workaround commented inside the issue to allow to make CORS requests.

Reviewed By: nikoant

Differential Revision: D22306977

fbshipit-source-id: ea0f5e3f1c4080037df258a6c5ce1fc89d433c3b
2020-06-30 06:52:07 -07:00
generatedunixname89002005306973
b943d215e0 Flipper Snapshot Bump: v0.49.1-SNAPSHOT
Summary: Releasing snapshot version 0.49.1-SNAPSHOT

Reviewed By: cekkaewnumchai

Differential Revision: D22307631

fbshipit-source-id: 9e3dab58e3f8117401f01eea2c05979f9efb82ad
2020-06-30 06:33:04 -07:00
generatedunixname89002005306973
8000090eac Flipper Release: v0.49.0
Summary: Releasing version 0.49.0

Reviewed By: cekkaewnumchai

Differential Revision: D22307632

fbshipit-source-id: 105fc71f07a4827a5d6e54cf3200b22f800a5f1e
2020-06-30 06:33:04 -07:00
Pascal Hartig
ba0a706bc8 Small fixes
Summary: Some small perf improvements, remove unnecessary cloning, etc.

Reviewed By: jknoxville

Differential Revision: D22307521

fbshipit-source-id: 91cfd16b0b05a24ec9639c2a2e26d504a6b01de4
2020-06-30 06:20:11 -07:00
Pascal Hartig
ceb9c942dc Back out "Bump sha2 from 0.8.1 to 0.9.1 in /packer"
Summary: Original commit changeset: 300f53aa1b69

Reviewed By: mweststrate

Differential Revision: D22288114

fbshipit-source-id: bc492dc633d66c993cddef49650818012cd0c9a1
2020-06-30 04:44:29 -07:00
Pascal Hartig
2f807880f4 Update dependabot.yml (#1299)
Summary:
Ewww, dependabot for GitHub is incompatible with the file format documented on dependabot.com.
So the current file is invalid:

![Screenshot 2020-06-26 15 04 59](https://user-images.githubusercontent.com/9906/85865837-6b4b7d00-b7be-11ea-9e5c-49007733a0e1.png)
Pull Request resolved: https://github.com/facebook/flipper/pull/1299

Test Plan: hopeitwork

Reviewed By: jknoxville, mweststrate

Differential Revision: D22286456

Pulled By: passy

fbshipit-source-id: bd783264b188fb5ce6e0e990bf269bca20d8d43b
2020-06-30 03:49:00 -07:00
Pascal Hartig
729549bc9f Set up GitHub test workflow for Packer (#1306)
Summary:
Per title.
Pull Request resolved: https://github.com/facebook/flipper/pull/1306

Test Plan: CI

Reviewed By: mweststrate

Differential Revision: D22285900

Pulled By: passy

fbshipit-source-id: 094cab21cc0f646495e9166435fb6563d50ee2a8
2020-06-29 10:10:39 -07:00
dependabot[bot]
39afce7ceb Bump sha2 from 0.8.1 to 0.9.1 in /packer (#1304)
Summary:
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.8.1 to 0.9.1.
<details>
<summary>Commits</summary>
<ul>
<li><a href="fb7186fb83"><code>fb7186f</code></a> Release sha-1 v0.9.1 and sha2 v0.9.1 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/177">https://github.com/facebook/flipper/issues/177</a>)</li>
<li><a href="f4f6ed5304"><code>f4f6ed5</code></a> Add build status links (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/176">https://github.com/facebook/flipper/issues/176</a>)</li>
<li><a href="a380194a69"><code>a380194</code></a> Add x86 intrinsics support for sha1 and sha2 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/167">https://github.com/facebook/flipper/issues/167</a>)</li>
<li><a href="570a200160"><code>570a200</code></a> Fix build links (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/174">https://github.com/facebook/flipper/issues/174</a>)</li>
<li><a href="feea49ec7e"><code>feea49e</code></a> update README examples (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/173">https://github.com/facebook/flipper/issues/173</a>)</li>
<li><a href="fcb7516192"><code>fcb7516</code></a> Release <code>gost94</code> and <code>streebog</code> (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/172">https://github.com/facebook/flipper/issues/172</a>)</li>
<li><a href="5fdcd03d5f"><code>5fdcd03</code></a> shabal v0.3.0 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/171">https://github.com/facebook/flipper/issues/171</a>)</li>
<li><a href="f427563094"><code>f427563</code></a> Release <code>groestl</code>, <code>md2</code>, <code>md4</code>, <code>ripemd320</code>, <code>whirlpool</code> v0.9.0 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/169">https://github.com/facebook/flipper/issues/169</a>)</li>
<li><a href="15c3060629"><code>15c3060</code></a> Bump opaque-debug to v0.3.0 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/168">https://github.com/facebook/flipper/issues/168</a>)</li>
<li><a href="d24f26b165"><code>d24f26b</code></a> Update block-buffer to v0.9 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/164">https://github.com/facebook/flipper/issues/164</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/RustCrypto/hashes/compare/sha2-v0.8.1...sha2-v0.9.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sha2&package-manager=cargo&previous-version=0.8.1&new-version=0.9.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1304

Reviewed By: jknoxville

Differential Revision: D22284220

Pulled By: passy

fbshipit-source-id: 300f53aa1b69e53d13e1095eb7755c2383a73e35
2020-06-29 07:35:52 -07:00
Pascal Hartig
8ff1411f91 Fix screen recording on Android 11
Summary:
Instead of relying on system blocks used, we use the file size reported by ls.
Android 11 seems to be more lazy when it comes to fsync'ing so there's a pretty
good chance that if we just check for with `du` or `ls -ls` we will see an "empty" file
because it hasn't been written to disk yet. By the normal `ls` output instead, we'll
just read the file and see how many bytes it's long, which should be more
accurate in all cases.

Changelog: Fix screen recording for Android 11 beta

Reviewed By: jknoxville

Differential Revision: D22283092

fbshipit-source-id: 6d33ca297f1c0734ab4ffc466d9e483aa1a1bdb5
2020-06-29 07:20:40 -07:00
Anton Nikolaev
dcd909779b Script to list all plugins included into Flipper desktop workspaces
Summary: Script to list all plugins included into Flipper desktop workspaces.

Reviewed By: passy

Differential Revision: D22256917

fbshipit-source-id: a3d8a0f9faea6e462a2f22be155d99eb22eb59d8
2020-06-26 09:07:12 -07:00
Pascal Hartig
5d033204e8 Update dmg-release.yml (#1296)
Summary:
The second publish job actually works, so let's remove the first one.
Pull Request resolved: https://github.com/facebook/flipper/pull/1296

Test Plan: https://github.com/facebook/flipper/runs/806859866?check_suite_focus=true

Reviewed By: jknoxville

Differential Revision: D22257369

Pulled By: passy

fbshipit-source-id: 72acc2e8ee10ad4514e315d57f4fa44656fce4e3
2020-06-26 07:52:25 -07:00