Commit Graph

1038 Commits

Author SHA1 Message Date
John Knox
6cd8e1519f Log start of payloads that are too big to send
Summary:
We've seen some crashes from toRSocketPayload, but aren't sure of the cause.
When we fail the DCHECK, there won't be any log output, so log before it if it's going to fail.

Reviewed By: passy

Differential Revision: D14131409

fbshipit-source-id: b71e043f0b5feac3d2e44a34cc38c72086f966ad
2019-02-19 08:50:30 -08:00
Pascal Hartig
4e295f3247 Add DebugMemoryManager interface
Summary:
Bit ugly, but allows us to use this interface in open-source
and internally. There's no buck target as we only need this
for Gradle.

Reviewed By: oprisnik

Differential Revision: D14132467

fbshipit-source-id: 998df6ce31f1fb7d00ea99d6d28759f7e2c800c3
2019-02-19 08:36:07 -08:00
Pascal Hartig
9e458379cf Flipper Bump: v0.16.1-SNAPSHOT
Summary: Snapshot.

Reviewed By: danielbuechele

Differential Revision: D14123168

fbshipit-source-id: 8be45d8218a6e63a28f5c74d9b40ae04c5e420dd
2019-02-19 07:21:44 -08:00
Pascal Hartig
625321a8bc Flipper Release: v0.16.0
Summary:
- The Layout inspector can now visualise Litho sections.

- Stop trimming log messages so white-space-sensitive outputs (like trees) are preserved (88cc299811).
- Upgrade Flow to 0.91 (09a93cd9e6).
- Fix a screen recording bug on Pixel devices (64c8163a01).
- Watch plugin files recursively (c6752110cf).

Reviewed By: danielbuechele

Differential Revision: D14123167

fbshipit-source-id: 30cfccf5cfd767348c396401c97596342a243880
2019-02-19 07:21:44 -08:00
Pritesh Nandgaonkar
92cc78c41d Handle the Logs when it is undefined
Summary: As per the title

Reviewed By: danielbuechele

Differential Revision: D14131195

fbshipit-source-id: 3b053c04e27de9faa8b8395bf4b0f6fe3d7c58dc
2019-02-19 05:33:43 -08:00
John Knox
6bdbb4f763 Wait 2s before checking for matching devices for connected clients
Summary:
Currently when a client connects, if there's no matching device we know of, it emits an error.

The problem is that there's a race between clients connecting and devices being detected, if the client connects first, then we'll emit this error, even though the device is displayed shortly afterwards.

Fixing this by waiting 2 seconds after a client connects, and then if it's still connected, checking for a matching device. This should be enough time to make this error more reliable.

Reviewed By: passy

Differential Revision: D14126315

fbshipit-source-id: c81b2c6d9a6e0639a656d1a4d7a8f999f715bfbf
2019-02-19 03:46:55 -08:00
John Knox
77c77b5eb3 Don't throw exceptions from FlipperStep destructor
Summary: Destructors should never throw, because if they are destructed while an exception is unwinding the stack the program will terminate.

Reviewed By: passy

Differential Revision: D14124423

fbshipit-source-id: 4b3d21663d44160bf24adacca25f50522d952e7c
2019-02-19 03:46:55 -08:00
Pascal Hartig
5a65393b64 Bump Litho dependency to 0.24.0
Summary: Per title. This unblocks the release.

Reviewed By: jknoxville

Differential Revision: D14124560

fbshipit-source-id: 4e9cf73b3598f894ebd60b6b15203f184b9a8381
2019-02-19 03:27:31 -08:00
Pascal Hartig
e53f8fa98d Provide clearer message about launcher delegation (#373)
Summary:
To make it more obvious how to disable this if unwanted (e.g. when
testing local builds).
Pull Request resolved: https://github.com/facebook/flipper/pull/373

Reviewed By: jknoxville

Differential Revision: D14130771

Pulled By: passy

fbshipit-source-id: 82c83c1ad14737c8c7791de71a1ee23fcea5ec18
2019-02-19 03:27:31 -08:00
Pritesh Nandgaonkar
5ad41b48ff Solves the bug which destroyed multi selection on ctrl+click
Summary: Soves the bug which caused the multiselection to clear off when one did ctrl+click

Reviewed By: jknoxville

Differential Revision: D14103906

fbshipit-source-id: 834d79e1c86a89b4d90c26e8db1850c1e8712a5d
2019-02-18 14:44:18 -08:00
Pritesh Nandgaonkar
cab61b0c15 Serialize and Deserialize helper function
Summary: This diff adds a helper function to serialize and deserialize javascript Objects

Reviewed By: danielbuechele

Differential Revision: D14101483

fbshipit-source-id: 3e1f37076ccc04b83cf7de5f10900e21e6474c1d
2019-02-18 14:44:18 -08:00
Daniel Büchele
8d134ba89e disable babel cache
Summary: as per title. see explanation in code comment

Reviewed By: jknoxville

Differential Revision: D14125820

fbshipit-source-id: 9b8e31214a65a184397852544cebd7b69ea0aadb
2019-02-18 12:49:34 -08:00
John Knox
f8ff6fe1b2 Catch all throwables in FlipperResponder destructor
Summary: Exceptions should never be thrown from destructors, because if an exception is already propogating at the time the destructor is called. Program will terminate.

Reviewed By: passy

Differential Revision: D14123526

fbshipit-source-id: 15ff74f4f14eb28a586055e1b1a5d54231b549da
2019-02-18 11:32:23 -08:00
Daniel Büchele
84240ede4e fix scrolling
Summary: "Plugin not showing" was scrolling with the sidebar. Fixed that.

Reviewed By: jknoxville

Differential Revision: D14123853

fbshipit-source-id: 12358bb3bd040701bafa080c2bcc27d8c837ea39
2019-02-18 07:22:59 -08:00
Daniel Büchele
9bf41f7bb7 add GK
Summary:
Users passing the GK `flipper_layout_inspector_new` will see then new layout inspector instead of the old one.

Hopefully users won't realize that they are on the new Layout Inspector. To make them aware of it, I added a bar on the bottom linking to the support group that is used for the GK.

Reviewed By: jknoxville

Differential Revision: D14100392

fbshipit-source-id: 78d561a3ab8ac035e5b439799c395901be086b1b
2019-02-18 05:17:52 -08:00
Daniel Büchele
a8a1869bc8 adding Searchbar
Summary: Adding the searchbar to layout inspector. Most of it's functionality is taken from the existing implementation.

Reviewed By: jknoxville

Differential Revision: D14100533

fbshipit-source-id: 6c3a49658d53c676489886b2599bef425f8f20d3
2019-02-18 05:17:52 -08:00
Daniel Büchele
649688db2a Sidebar
Summary:
This is mostly only moving the Sidebar from the old LayoutInspctor to a separate file. The old file was part of the UI component, however, it was super specific to the layout inspector, so I felt it makes sense moving it there.

Here is a diff between the new `src/plugins/layout/layout2/InspectorSidebar.js` and `src/ui/components/elements-inspector/sidebar.js`: P60951781

The old file is still kept around, as long as the old and new layout inspector are run side by side.

Reviewed By: passy

Differential Revision: D14100537

fbshipit-source-id: b5a6fbae9866732800bb9b2b8fb1b996b9861db6
2019-02-18 05:17:52 -08:00
Daniel Büchele
4f425b05b4 Alignment mode
Summary: Adding a toggle to enable/disable alignment mode

Reviewed By: jknoxville

Differential Revision: D14100534

fbshipit-source-id: e3a49f1f31112ca2c99c2246a12c4f34be1ec61a
2019-02-18 05:17:52 -08:00
Daniel Büchele
53f3f2d40f Target mode
Summary: Adding a toggle to enable/disable target mode

Reviewed By: jknoxville

Differential Revision: D14100535

fbshipit-source-id: 9251f2d2f9d3013650421be62719ad5fb254e804
2019-02-18 05:17:52 -08:00
Daniel Büchele
c21875e168 refactoring
Summary:
This is refactoring the layout inspector. The old layout inspector was a single file with more than 1200 LOC which was really hard to debug and extend. This aims for splitting it up into smaller, easier to maintain components.

This version of the layout inspector only shows the view hierarchy for the regular view tree and the a11y tree. Additional features are added in stacked diffs.

Reviewed By: jknoxville

Differential Revision: D14100536

fbshipit-source-id: ca5e22dbb6ed9e34ce208a2a699ebfeb083904ad
2019-02-18 05:17:52 -08:00
Daniel Büchele
b70a18cef2 ToolbarIcon component
Summary: Adding a ToolbarIcon component that displays an icon in the toolbar that can be toggled on and off. This is used in subsequent diffs.

Reviewed By: passy

Differential Revision: D14100393

fbshipit-source-id: d814b52cf77585c4e8d090e11399e005713efb5e
2019-02-18 05:17:51 -08:00
Jonathan Kim
13bdfedeb1 Codemod rest of xplat// -> fbsource//xplat
Differential Revision: D14057661

fbshipit-source-id: 7780ec117cbe5deb8cf9211b228b186bf97e1b1f
2019-02-16 23:59:40 -08:00
Pascal Hartig
ab6ebf665e Bump android gradle plugin (#372)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/372

Some prep for AndroidX upgrade.

Reviewed By: danielbuechele

Differential Revision: D14101014

fbshipit-source-id: 15571528340ea149be77985b3d194d832f253597
2019-02-15 08:54:10 -08:00
Daniel Büchele
c6752110cf watch recursive
Summary: Plugin files in subfolders were not watched. Adding recursive flag to reload plugins, even when there are changes in any of the plugin's subdirectories.

Reviewed By: jknoxville

Differential Revision: D14100394

fbshipit-source-id: 2a0b5e35df4bbbfe6cf8a0fafd5271222d99a46c
2019-02-15 06:31:31 -08:00
John Knox
d5dc3f9c2a Add timestamp columns to network inspector
Summary: Adds requestTimestamp, and responseTimestamp which is hidden by default.

Reviewed By: passy

Differential Revision: D14088403

fbshipit-source-id: c451a428d8068c5bfce199cda5502361c12d1667
2019-02-15 04:57:38 -08:00
John Knox
ee54a54ff2 Clean up log statement
Summary: Looks like a left over debug log

Reviewed By: danielbuechele

Differential Revision: D14086508

fbshipit-source-id: 6bf3ef40746d8d248ed38071107cae00ba3040f9
2019-02-15 04:32:43 -08:00
John Knox
d95e81b17d Deprecate client.send()
Summary:
Adds a warning when not in production and client.send() is used.

We could just delete it but there may be open source users of the API.

Reviewed By: passy

Differential Revision: D14085002

fbshipit-source-id: 39f965b59540bd5b7059ec8d6b1c274146699d2d
2019-02-14 09:55:50 -08:00
John Knox
2a938c5b81 Change all plugin uses of client.send to client.call
Summary: client.send will be deprecated because it doesn't allow handling or detection of errors.

Reviewed By: passy

Differential Revision: D14084786

fbshipit-source-id: 7ebe4a7f3f8536c705e1c9302f38db0a34d99dc4
2019-02-14 09:55:50 -08:00
John Knox
8eb790b8b5 Fix Litho container props in layout inspector
Summary: The layout inspector isn't showing props for litho views. This fixes that.

Reviewed By: passy

Differential Revision: D14052057

fbshipit-source-id: fa6fe14785bc1588db6624c1319aedf88d843763
2019-02-14 09:30:41 -08:00
John Knox
e33e2d4d06 Unify Logger interface usage
Summary:
Unified all imports of Logger. Some were called LogManager before.
Now the fb-stub and the fb variants use the same interface.
Constructor of Logger is no longer exposed so it can't be initialized twice, unless in the case you're explicitly using the fb variant, which has extra functionality.

Reviewed By: danielbuechele

Differential Revision: D14083929

fbshipit-source-id: 9b61a06e1264d5f142b5a9188465c99deaf18193
2019-02-14 09:23:41 -08:00
John Knox
8ff4c4f56d Remove duplicate Logger in headless/index.js
Summary:
init() was being misused. This returns a Logger instance, so there's no need to create one as well.
This was a problem because different arguments were being passed to each (isHeadless in this case).

Reviewed By: passy

Differential Revision: D14083320

fbshipit-source-id: b0001a2b3cdd914609d54382575e3b0fa4b5f077
2019-02-14 09:23:41 -08:00
Pritesh Nandgaonkar
b9db2411cf Add archived device type
Summary:
This diff adds archived device type. This diff solves the following two problems.

- The Plugin which are device plugins and are device plugins will not show up. Look at the video, where the CPU plugin was showed, even though the imported file didn't have any information.
- An icon of 📦 will make much clearer which one is archived device and which isn't

Reviewed By: passy

Differential Revision: D14066399

fbshipit-source-id: 59b740d7fe9532e665d6b1ec6ad0124fb63ac45d
2019-02-14 06:34:02 -08:00
John Knox
9b6db1f482 Respond on exceptions thrown when on main thread
Summary: Changes FlipperPerformBlockOnMainThread to take a responder, and respond with an error if an exception is caught.

Reviewed By: passy

Differential Revision: D14066982

fbshipit-source-id: 70135bf58171684bcd013c66d9deec366aed36f5
2019-02-14 06:24:38 -08:00
Pascal Hartig
c0b5f10693 Add --launcher-msg option to pass to desktop app
Summary:
Allows the launcher to provide messages to the user. Currently, in the form
of the red notification bar at the bottom. This is just meant as a temporary measure
during the alpha to have some clearly noticeable way of getting the user's attention.

I consider removing this a blocker for the release as this mechanism is not well
suited for this in many ways.

The current use case for this is providing a warning if a cached version is used
instead of the requested one, e.g. "Could not fetch requested Flipper version 'deadbeef', using cached version instead."

Reviewed By: jknoxville, priteshrnandgaonkar

Differential Revision: D14073687

fbshipit-source-id: 85630347027063103315eeb1286731fe2478e261
2019-02-14 06:02:44 -08:00
John Knox
3caa0da887 Use call instead of send
Summary: Going to deprecate send, so changing these to call so the plugins can respond to errors.

Reviewed By: passy

Differential Revision: D14066981

fbshipit-source-id: 440563f1bf1a1a145fcfd0e6f36af63bf27836ed
2019-02-14 05:18:19 -08:00
Pritesh Nandgaonkar
9a8e30681b Handle the case of Logs not being present
Summary:
- handles the case when log is not present
- solved the cpu plugin error
- now `fileversion` is the flipper version

Reviewed By: jknoxville, danielbuechele

Differential Revision: D14065882

fbshipit-source-id: f88414bbb3d766f8ab6e0ec00943b59738918a0e
2019-02-14 04:53:56 -08:00
Pascal Hartig
a41d8eb4f8 Delegate to launcher app on startup
Summary:
For the production version, if the Launcher is installed and no `--no-launcher` (note the double-negation) is supplied, then
let the launcher start the app instead.

The launcher will pass the `--no-launcher` option back to prevent this from looping.

Reviewed By: jknoxville

Differential Revision: D14066620

fbshipit-source-id: 27d305efac36005e5e1082076829f10ef14aba0d
2019-02-14 02:33:06 -08:00
Pascal Hartig
2b9e3c54c6 Set up --no-launcher flag
Summary: For future use to disable launcher loops.

Reviewed By: jknoxville

Differential Revision: D13979653

fbshipit-source-id: db56f7d71d7a4d1322cb36622313dbad4307396d
2019-02-14 02:33:06 -08:00
Nathan Schneider
39cb25ade9 Update communicating.md (#370)
Summary:
FIxed a grammatical issue in line 32.
Pull Request resolved: https://github.com/facebook/flipper/pull/370

Reviewed By: passy

Differential Revision: D14064608

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 87fc04ff56227211a43db9919ccec00380e77bc8
2019-02-13 08:08:16 -08:00
Nathan Schneider
a0d33a99e5 Updated crash-reporter-plugin.md (#371)
Summary:
Fixed a spelling error in line 6.
Pull Request resolved: https://github.com/facebook/flipper/pull/371

Reviewed By: passy

Differential Revision: D14064606

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 51535362477712500c3138d1e7a688cdda8e3793
2019-02-13 07:51:49 -08:00
John Knox
ff076d9dcd FlipperResponder: no response = success
Summary:
If an exception is thrown from the plugin, FlipperClient.cpp will catch it and respond with an error response.
If the object goes out of scope with no response being returned, then return a success response in the destructor.

Reviewed By: passy

Differential Revision: D14024259

fbshipit-source-id: 52e419dd23fc3882e8b92b593e8c1e1ea90e2b26
2019-02-13 05:13:42 -08:00
Edward Pastuszenski
dfbd12cd63 Expose FlipperArray construction from JSON
Summary: Enables `FlipperArray`s to be constructed from `JSONObject`s or JSON `String`s, as `FlipperObject`s can be.

Reviewed By: jknoxville

Differential Revision: D13996135

fbshipit-source-id: d8a445d907799cd51dcdb3ba832dfe6fddb7171e
2019-02-12 13:20:49 -08:00
Pritesh Nandgaonkar
059ac83fcf Do not import already imported data
Summary: Before this diff, if one imported same file twice, it duplicated app data.This diff fixes that. When one tries to import the already imported file then this diff will select that flipper files device in the UI.

Reviewed By: jknoxville

Differential Revision: D14045145

fbshipit-source-id: f17c83486ffcdb0e2a57c70b1589e34567811d01
2019-02-12 08:37:14 -08:00
John Knox
c912dcaf48 Add isHeadless attribute to scribe messages
Summary:
So we can distinguish between humans and the machines.

We can redirect the traffic to different tables based on this attribute if necessary.

Reviewed By: danielbuechele

Differential Revision: D14025004

fbshipit-source-id: c3a24b5f8a30f24445eaee67843b78ddabfc9d51
2019-02-12 08:29:20 -08:00
Pritesh Nandgaonkar
029377a849 Change the export file extension type
Summary: This diff imports and exports data in a `.flipper` file extension. This diff also adds the support to open flipper app by double clicking on the `.flipper` file.

Reviewed By: danielbuechele

Differential Revision: D14042846

fbshipit-source-id: 17e6b55bf2796d9abdf985411fce799600f7792b
2019-02-12 06:48:06 -08:00
Mihaela Ogrezeanu
73b816de16 Click to focus in hierarchy
Summary:
as title; this shouldn't change how focus worked before on views, but accounts for the new Section nodes
Depends on D13900789

Reviewed By: astreet

Differential Revision: D13900846

fbshipit-source-id: 093016c17b5c1351108dbd9c884bf99a1b4d49cb
2019-02-12 06:30:46 -08:00
Mihaela Ogrezeanu
8855687963 Highlight section
Summary:
as title, highlight a section when hovering over it
Depends on D13900729

Reviewed By: astreet

Differential Revision: D13900789

fbshipit-source-id: 552554f5ecf9a9dd3edf4724581b7dee6a8a855d
2019-02-12 06:30:46 -08:00
Mihaela Ogrezeanu
ec98c857c2 Enable section descriptors in Flipper from configDepends on D13803338/
Summary: as title

Reviewed By: passy

Differential Revision: D13803412

fbshipit-source-id: a9d511ca7d5466eb9b1f82f93b6c48879f0aa02e
2019-02-12 06:30:46 -08:00
Mihaela Ogrezeanu
e86a5166ad Add descriptors to view a Section as a child of LithoRecyclerView
Summary:
This doesn't add new behaviour. It adds NodeDescriptor implementations for rendering Section nodes inside Litho flipper inspector.
We'll consider LithoRecyclerView as the point where we can detect a section hierarchy, and it will (for now) have as a child a DebugSection which is the root of the SectionHierarchy.
Depends on D13802978

Reviewed By: astreet

Differential Revision: D13803272

fbshipit-source-id: a5367d97315349770201a29f5d5bd05baec0405e
2019-02-12 06:30:46 -08:00
Daniel Büchele
825bfffd21 create one headless file for all platforms
Summary: We are distributing a single package via fbpkg containing the headless version linux and macOS. This changes the build process to only create a single zip-file containing these binaries.

Reviewed By: passy

Differential Revision: D14042031

fbshipit-source-id: 88992f17501353a70bc21799c6bd2957576268a3
2019-02-12 06:18:56 -08:00