Fix dependency issue#902
Conversation
Fix this crash I see when building for android:
```
:app:generateBundledResourcesHashDebug
module.js:471
throw err;
^
Error: Cannot find module '/var/folders/94/wngs1jw91_n2_jjjrfljtqrc0000gn/T/CodePushResourcesMap-1b95774b.json'
```
Looks like these two tasks (`recordFileBeforeBundleCommand` and `generateBundledResourcesHash`) run in parallel, which create problems because one depends on a file generated by the other. Not sure why others don't have this issue, though, but I suspect this is exactly the issue reported in microsoft#836
|
This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request. |
|
Hi @mikelambert, thanks for the contribution, LGTM! Could you please also take a look at #857 and verify if it resolves the issue you have? |
|
That changelist 857 was supposed to help the original reported bug 836. However, AFAIK the bug was a race condition where the "reader" ran before the "writer" did, resulting in an error trying to open the file. Passing in the same filename to both scripts (as 857 does) is smart and probably a better design, but it doesn't change anything to prevent the writer from running before the reader (which can still happen with that change). Thus this change, which enforces an explicit ordering dependency between them. |
|
@mikelambert, got it, thanks for the clarification! |
Fix this crash I see when building for android:
Looks like these two tasks (
recordFileBeforeBundleCommandandgenerateBundledResourcesHash) run in parallel, which create problems because one depends on a file generated by the other. Not sure why others don't have this issue, though, but I suspect this is exactly the issue reported in #836