David Aurelio
3e08a28987
Remove irrelevant options from cache key
...
Reviewed By: jeanlauliac
Differential Revision: D4938131
fbshipit-source-id: 88b686bc5ee6946297e1fd1b91d46fa618f0d9d7
2017-04-25 04:02:06 -07:00
Jean Lauliac
f519f16180
packager: GlobalTransformCache: throat() the file fetching function
...
Reviewed By: cpojer
Differential Revision: D4914187
fbshipit-source-id: ae3b8aa4ed4dbd1896ca35cf498b7c02fd109f58
2017-04-19 11:00:41 -07:00
Jean Lauliac
0001d3ce4e
packager: worker: strenghten TransformOptions
...
Reviewed By: davidaurelio
Differential Revision: D4906499
fbshipit-source-id: e7948d09c678d3e270ddd9fd355597eb5d535781
2017-04-19 06:33:52 -07:00
Jean Lauliac
de3478c1b1
packager: GlobalTransformCache: cache the transform options digest
...
Reviewed By: davidaurelio
Differential Revision: D4906974
fbshipit-source-id: b6cf83ba6a072400685948329070e171f65c837d
2017-04-19 03:15:38 -07:00
Jean Lauliac
219328d000
packager: preprocess outdated dependencies
...
Summary:
Note: if this changeset causes some breakage, consider disabling rather than reverting. To disable, the call to `_preprocessPotentialDependencies` in `ResolutionRequest` can be removed.
It's a bit of an experiment. I couldn't see any particular regression caused by this, but I could see net improvement of the global cache performance, as it unlock much, much stronger batching: indeed, instead of discovering dependencies progressively, we synchronously figure out the list of all potential modules of a bundle, and kick-off cache fetching and/or transformations. So when it comes to fetching from the global cache, it'll do less requests, and each requests will ask for considerably more keys at a time.
Potential problem caused by this changeset: if a module's dependencies completely changed, then the first time we try to build the bundle it'll start transforming modules that we probably don't care at all anymore, spending precious CPU time for nothing. I've been thinking about it and I cannot see such a case happening much often. Even if it happens, it should not cause any bug or corruption, it would just take additional time.
Other potential problem: that this new code doesn't handle some types of edge cases. It's quite hard to figure out what could possibly break in the `ResolutionRequest` code (and I think it would benefit from a larger refactor). We do have a good test coverage for `DependencyGraph` and it seems to work smoothly, so I'm relatively confident we're not breaking edge cases.
Reviewed By: davidaurelio
Differential Revision: D4875467
fbshipit-source-id: 2dfcc755bec638d3d1c47862ec1de5220953e812
2017-04-13 10:31:30 -07:00
Christoph Pojer
abcd1b6370
Use escape hatch for mocked modules
...
Reviewed By: davidaurelio
Differential Revision: D4869222
fbshipit-source-id: d2cf66296a26710630f0d0f6c8efc7ff3ed97bc5
2017-04-12 09:47:34 -07:00
Christoph Pojer
deebf15a56
Move formatBanner into packager folder
...
Reviewed By: davidaurelio
Differential Revision: D4868954
fbshipit-source-id: 7a28019c781262bcf4aab0ad2e67868d35ebf9fb
2017-04-12 02:44:51 -07:00
Jean Lauliac
8fc3b48c65
packager: worker: remove extern option
...
Reviewed By: davidaurelio
Differential Revision: D4867367
fbshipit-source-id: ebe5fa860566e87bd6d042ee41b9a7aa9c777fc6
2017-04-11 08:15:57 -07:00
Jean Lauliac
cb88df00ae
packager: TransformCache: do not include basename in hash
...
Reviewed By: cpojer
Differential Revision: D4867411
fbshipit-source-id: ece5214ee9cf152e23790c70f7a8b12060725150
2017-04-11 05:31:26 -07:00
Jean Lauliac
568fb403bf
packager: GlobalTransformCache: fix bug in retry logic
...
Reviewed By: bestander
Differential Revision: D4850644
fbshipit-source-id: ede9991eaac3c7bfd045f2a9c3e9d0b10d45af0f
2017-04-07 05:04:23 -07:00
Jean Lauliac
77bee75893
packager: GlobalTransformCache: make key globalized
...
Reviewed By: davidaurelio
Differential Revision: D4835217
fbshipit-source-id: b43456e1e1f83c849a887b07f4f01f8ed0e9df4b
2017-04-06 04:46:22 -07:00
Jean Lauliac
03892d1036
packager: GlobalTransformCache: retry 502 and 503 HTTP statuses
...
Reviewed By: davidaurelio
Differential Revision: D4818997
fbshipit-source-id: b31b004939f9e83c8a3a8c34b07c8b1ae2d4d17e
2017-04-04 04:16:21 -07:00
Jean Lauliac
cc2ec6ff07
packager: TransformCache: use sha1 instead of murmurhash
...
Reviewed By: davidaurelio
Differential Revision: D4809941
fbshipit-source-id: 33b6c56b4c48eca88d8c1922f52ed29a728d1173
2017-04-03 06:03:17 -07:00
Jean Lauliac
4bd7dc0035
packager: TransformCache: do not rehash transformOptions every single time
...
Reviewed By: davidaurelio
Differential Revision: D4809963
fbshipit-source-id: 9d3ac907e822596567ee7af4427bcd24f1bac73f
2017-04-03 04:45:00 -07:00
Brent Vatne
b80e2c8799
Move packager initialization events to reporter
...
Summary:
This PR depends on #13172
Packager events are mostly logged through the TerminalReporter by default (#13172 makes this configurable). But there are a few things that aren't passed through TerminalReporter.
- We [log a banner with some information about the port and what's going on](https://github.com/facebook/react-native/blob/8c7b32d5f1da34613628b4b8e0474bc1e185a618/local-cli/server/server.js#L22-L32 )
- Also [a message about looking for JS files](https://github.com/facebook/react-native/blob/8c7b32d5f1da34613628b4b8e0474bc1e185a618/local-cli/server/server.js#L34-L38 ) (not sure what that is for / if it is useful beyond telling the user what directory root they started the packager in, but that's another thing).
- If the packager fails to start, then [we log an error message](https://github.com/facebook/react-native/blob/8c7b32d5f1da34613628b4b8e0474bc1e185a618/local-cli/server/server.js#L41-L61 ).
This pull request changes those log messages to be handled by TerminalReporter. I tri
Closes https://github.com/facebook/react-native/pull/13209
Differential Revision: D4809759
Pulled By: davidaurelio
fbshipit-source-id: 2c427ec0c1accaf54bf6b2d1da882cd6bfaa7829
2017-03-31 02:17:22 -07:00
Jean Lauliac
33000c74f9
packager: GlobalTransformCache: retry keys fetches
...
Reviewed By: davidaurelio
Differential Revision: D4779641
fbshipit-source-id: 1b156bf075fa2456d9e6b1a3f38855357abc1abb
2017-03-28 11:01:53 -07:00
Jean Lauliac
20ba987139
packager: TerminalReporter: stop reporting global cache errors
...
Summary: At FB we log errors into the error infra, and these errors are not actionnable for end users, so let's reduce the noise generated on the terminal. In the OSS case, people can simply add a handler in a TerminalReporter decorator, the same way we do internally (anyhow, I do not know of anyone using the global cache in OSS for now).
Reviewed By: davidaurelio
Differential Revision: D4762858
fbshipit-source-id: 880c02e175ae551df11b7ce273acc318222c46bf
2017-03-23 12:31:39 -07:00
Jean Lauliac
d5288e7698
packager: GlobalTransformCache-test: disable non-deterministic test
...
Reviewed By: davidaurelio
Differential Revision: D4751434
fbshipit-source-id: 1be748387abe9ca0ce030bd2423827dfe5c2a146
2017-03-22 06:54:20 -07:00
Jean Lauliac
439cb76a00
packager: GlobalTransformCache: reduce asynchronicity for non-cached bundles
...
Reviewed By: davidaurelio
Differential Revision: D4745595
fbshipit-source-id: 3126fdcc11dd1c8085316457ead0cabae633d0db
2017-03-21 06:01:12 -07:00
Jean Lauliac
4cbb64521a
packager: GlobalTransformCache: ignore errors related to fetching
...
Reviewed By: davidaurelio
Differential Revision: D4745584
fbshipit-source-id: 2c9b2451d3525c90308fb88784945462cd827d1f
2017-03-21 06:01:12 -07:00
Jean Lauliac
5c128ad049
packager: GlobalTransformCache: add unit test
...
Summary: Finally adding some unit test to increase confidence in the correctness of that piece of code.
Reviewed By: davidaurelio
Differential Revision: D4721543
fbshipit-source-id: 56776290d61f2b51c69d7eeae09663e3bc892b50
2017-03-21 06:01:12 -07:00
Jean Lauliac
3bb9512484
packager: FBGlobalTransformCache: move the retry/error logic
...
Reviewed By: davidaurelio
Differential Revision: D4713585
fbshipit-source-id: 6a83f858692b8a1f6326051f3a3f4a3a549e4027
2017-03-16 14:01:10 -07:00
Jean Lauliac
bb266715f1
packager: GlobalTransformCache: finish conversion to async/await
...
Reviewed By: davidaurelio
Differential Revision: D4713456
fbshipit-source-id: f65c45439d1657872e28a296f13a73ee2032ea93
2017-03-16 09:40:25 -07:00
Jean Lauliac
014eef3c74
packager: verify validity of TTY before using it
...
Reviewed By: mkonicek
Differential Revision: D4689779
fbshipit-source-id: 9bc2c1447bd64ec392adef772b1189a782f83545
2017-03-10 10:50:10 -08:00
Jean Lauliac
1030aabbc4
packager: Resolver: make the Resolver construction a Promise
...
Reviewed By: cpojer
Differential Revision: D4681614
fbshipit-source-id: 5da558280edf300f67042e72c65b272e49351871
2017-03-10 04:13:06 -08:00
Jean Lauliac
3e9dedf1ac
packager: minimize terminal.log() work
...
Reviewed By: davidaurelio
Differential Revision: D4650441
fbshipit-source-id: 2de2c8e5bea29179fd04ef8db67ac385b3f0a06b
2017-03-03 11:14:53 -08:00
Christoph Pojer
4d00df41b4
Fix lint errors 2/2
...
Reviewed By: jeanlauliac
Differential Revision: D4628330
fbshipit-source-id: 94fad1294e22fa0073e15843f94241ae778112a0
2017-03-01 08:15:51 -08:00
Christoph Pojer
5403946f09
Fix lint errors 1/n
...
Reviewed By: davidaurelio
Differential Revision: D4627645
fbshipit-source-id: 3cf368c6a24a555b7d0a39045f6ba6fd92ae34e1
2017-02-28 09:00:42 -08:00
Jean Lauliac
2030b6befe
packager: terminal: split status too big to fit in screen
...
Reviewed By: cpojer
Differential Revision: D4627512
fbshipit-source-id: 6e7b5f3a6e2d012a44373014f93ab17ef4f290a2
2017-02-28 06:45:56 -08:00
Jean Lauliac
a7d3940de6
GlobalTransformCache: increase timeout
...
Reviewed By: davidaurelio
Differential Revision: D4589052
fbshipit-source-id: 7eaec58a196db7f89b3039afbda4620889c9bcef
2017-02-20 10:46:04 -08:00
Jean Lauliac
564126f2bf
packager: BatchProcessor: use Promise for processBatch()
...
Reviewed By: cpojer
Differential Revision: D4572495
fbshipit-source-id: 4a18b6ae16ea588104c337f2085707be07609005
2017-02-20 08:45:21 -08:00
Jean Lauliac
bac576c433
packager: BatchProcessor: use Promise for queue()
...
Reviewed By: cpojer
Differential Revision: D4572181
fbshipit-source-id: 34c3824f05efd93847df9ba5931b0735c6711c28
2017-02-20 08:45:19 -08:00
Jean Lauliac
e56b5be904
packager: JSONReporter: expose errors correctly
...
Reviewed By: cpojer
Differential Revision: D4536721
fbshipit-source-id: d8969a42e844da809bd167cbc1bae2cb11f1db57
2017-02-10 09:30:08 -08:00
Jean Lauliac
57010d63b6
packager: cleanup build status reporting
...
Reviewed By: cpojer
Differential Revision: D4521560
fbshipit-source-id: 8943e179192522da5145e4f14f0b648d3548cc36
2017-02-09 04:20:41 -08:00
Christoph Pojer
fc60f5948a
Change transformCacheKey to getTransformCacheKey
...
Reviewed By: jeanlauliac
Differential Revision: D4506459
fbshipit-source-id: cd42cb4f09c0130d08c27e3a097710b91c5dc6ba
2017-02-09 04:03:17 -08:00
Christoph Pojer
a2c84d14ce
Remove react-packager indirection.
...
Summary:
This moves the `src` directory one level up and removes the `react-packager` folder. Personally, I always disliked this indirection. I'm reorganizing some things in RNP, so this seems to make sense.
Not sure if I forgot to update any paths. Can anyone advice if there are more places that need change?
Reviewed By: jeanlauliac
Differential Revision: D4487867
fbshipit-source-id: d63f9c79d6238300df9632d2e6a4e6a4196d5ccb
2017-02-02 05:44:15 -08:00