Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependency issue #902

Merged
merged 1 commit into from
Jun 26, 2017
Merged

Conversation

mikelambert
Copy link
Contributor

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 #836

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
@msftclas
Copy link

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.
Thanks,
Microsoft Pull Request Bot

@sergey-akhalkov
Copy link
Contributor

sergey-akhalkov commented Jun 26, 2017

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?

@sergey-akhalkov sergey-akhalkov self-assigned this Jun 26, 2017
@mikelambert
Copy link
Contributor Author

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.

@sergey-akhalkov
Copy link
Contributor

@mikelambert, got it, thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants