Commit Graph

16 Commits

Author SHA1 Message Date
Anton Nikolaev
fa7f970266 Plugin change detection is unreliable on Windows VM
Summary:
On Windows VM when "yarn start" is executed and compilation is in progress for some plugin, fs.watch randomly fires "changed" events for different files of other plugins. This leads to infinite attempts to rebuild the same plugin again and again, and this process never ends, so "yarn start" is almost unusable:
{F225467225}

I've tried to fix this by using watchman instead of fs.watch and on my tests with Windows build it works well:
{F225467508}

Also as watchman is more careful about opening file handles, hopefully this change will fix "too many files opened" problem as Michel suggested here https://fb.workplace.com/groups/flippersupport/permalink/764157990731528/ and here https://github.com/facebook/flipper/issues/699.

Reviewed By: mweststrate

Differential Revision: D19216026

fbshipit-source-id: acc53ae0d003a7936730e6423ac4dbca84f089c8
2019-12-31 04:38:07 -08:00
Anton Nikolaev
1ddf73caf3 Github build is broken because of Doctor module resolution issue
Summary: Fixed doctor module resolution on github by adding doctor src folder into the metro bundler blacklist

Reviewed By: cekkaewnumchai, mweststrate

Differential Revision: D19020038

fbshipit-source-id: a6ab95383b5016fd5e2180d72883a42c63745ec9
2019-12-13 07:08:28 -08:00
Anton Nikolaev
3fefd9de15 Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub
Summary: Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub

Reviewed By: mweststrate

Differential Revision: D18963720

fbshipit-source-id: 61ea78ecbb154de79c7a2d348f347c64325e794c
2019-12-13 04:06:02 -08:00
Michel Weststrate
6e69d20917 Don't bundle react-native dependencies
Summary: Make sure that `.native.js` modules resolutions are _NOT_ prefered over `.js` modules when building flipper or flipper plugins

Reviewed By: jknoxville

Differential Revision: D18297580

fbshipit-source-id: 73f9114d19eb0934cdf69d9668b582966aedc756
2019-11-04 05:07:00 -08:00
Chaiwat Ekkaewnumchai
7017ed3458 Update React-Redux
Summary:
D18169584 introduced state error which I didn't notice. This diff reverted the diff.
`hg backout D18169584`

Original commit changeset: 77a8b034c5e4

Reviewed By: jknoxville

Differential Revision: D18203354

fbshipit-source-id: 3e281f1e8c7e1d2bf41665adfa5ce5f13daca3a1
2019-10-29 12:14:27 -07:00
Chaiwat Ekkaewnumchai
18ea77690e Update React-Redux
Summary: Update and include `react-redux` to Greenkeeper

Reviewed By: passy

Differential Revision: D18169584

fbshipit-source-id: 77a8b034c5e4a13a2ba6c82895e1aee9d852375e
2019-10-28 08:08:39 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
John Knox
5d99817555 Add --no-plugins arg to speed up headless development
Summary:
Compiling headless flipper takes a long time. This is because it individually compiles and bundles every plugin.

When debugging core headless, you don't need to compile any plugins, so this adds a build flag `--no-plugins` to skip that and vastly speed up iteration speed.

Reduces build time from 3 minutes to 20s

Reviewed By: priteshrnandgaonkar

Differential Revision: D16131322

fbshipit-source-id: 2b38ee37183a1257b3993f392cf623b2631fd7da
2019-07-05 08:09:18 -07:00
Pascal Hartig
939cc531e2 Fix revision bundling
Summary:
This fixes headless not terminating due to the `package.json` not being readable.
I instead write this to the `global` object in the same way that the version is
set.

Reviewed By: jknoxville

Differential Revision: D14579316

fbshipit-source-id: 238afe912366c423552305e120088f4abac4c20b
2019-03-22 10:41:01 -07:00
Pascal Hartig
c2b6df7c3b Use prefixed temp folder
Summary:
I'm accumulating a lot of those in my tmpfs and
it would be great to immediately identify the
ones coming from Flipper.

Reviewed By: danielbuechele

Differential Revision: D14406809

fbshipit-source-id: 6b74e8260a841d5db76ac34643ee0226abba735a
2019-03-13 03:40:06 -07:00
Daniel Büchele
520ffec7c9 removing entry, rootDir from defaultPlugins
Summary:
When bundling default plugins, we create a JSON-file containing information about the plugin and where to require it from. This information contained two filed: `entry` and `rootDir`, which were written while bundling the plugins. Because the plugins are bundled on Sandcastle, this was a path on the Sandcastle machine.

This also happened for the OSS version, see the screenshot from a GitHub issue.
Entry and rootDir are only used during the build process and not needed afterwards, so it is save to remove them from the JSON.

https://pxl.cl/qQSx

Reviewed By: passy

Differential Revision: D14165679

fbshipit-source-id: 4e7c5ac25652758ccfc3a459f4dd197254c6f897
2019-02-21 09:39:54 -08:00
Daniel Büchele
6ada04bc38 ignore flipper-public/dist folder in build
Summary:
Builds in flipper-public are failing, because duplicate imports: https://our.intern.facebook.com/intern/sandcastle/job/22517998213713260

That's most likely because the `flipper-public` is not blacklisted in metro, so let's add it!

Reviewed By: passy

Differential Revision: D14134423

fbshipit-source-id: 52f87196957c8578b8ac7f578efa74e3c13fe1bb
2019-02-20 06:58:54 -08:00
Daniel Büchele
e78bd57514 build headless
Summary:
- create a zip-file when building the headless version of Flipper
- restore pkg cache in Sandcastle from pantri
- run build script in sandcastle.

Changes need to go together with D13942919

Reviewed By: passy

Differential Revision: D13942701

fbshipit-source-id: caac7d6cda99fec2a6836c652957ff609a0bf8bb
2019-02-05 11:35:52 -08:00
Daniel Büchele
22f9401e05 move version number to build-utils
Summary:
* The generation of the version number is moved to build-utils so it can be used from the headless build process as well.
* The prelude script for the headless version exposes the version number on `global.__VERSION__`
* While at this file, moving some functions in the build process to use the Sync version. Doesn't matter for the build process anyways and the syntax is much nicer.

Reviewed By: passy

Differential Revision: D13843678

fbshipit-source-id: 7df8364044ab6ebc83a4060aab2e3a42ae48a934
2019-02-04 07:29:13 -08:00
Daniel Büchele
5b68c59b5c package bundle
Summary:
For the electron build, plugins are bundled with the app and loaded from there at launch. The headless version can't require from its binary, so plugins need to be required from another path.

This diff makes the path where bundled plugins are loaded from adjustable via an environment variable: `BUNDLED_PLUGIN_PATH`. If it's set, the plugins are loaded from this path, otherwise we default to the old behaviour of including them from `./defaultPlugins`.

For the headless version we expect the plugins to be in a folder called `plugins` next to the executable. This should later be configurable via an argument passed to the CLI.

Reviewed By: passy

Differential Revision: D13843676

fbshipit-source-id: 04237ae6631b4f2ba56887fe992a56f860724edc
2019-02-04 07:29:13 -08:00
Daniel Büchele
78cd40e890 split build process
Summary: Moving a couple of build function from `build-release` to `build-utils` so they can be shared between the desktop build process and the headless build process.

Reviewed By: passy

Differential Revision: D13786575

fbshipit-source-id: df0a0da6d9a643e3e1c65470e1e96254e8966dd9
2019-01-25 12:19:07 -08:00