-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Changes to Chrome resource files don't get picked up by ninja #7
Comments
Lols. After lots of head scratching I find this comment I wrote to myself: |
Fixed in the current gyp.patch. |
This seems to have regressed. Following the original repro steps, ninja does stuff, but ninja/resources.pak isn't changed unless I explicitly say 'ninja -j100 packed_extra_resources': (edit sync_index.html to add a comment at the top) $ ninja -j100 -v chrome ninja: WARNING: multiple rules generate ninja/gen/libraries.o. build will not be correct; continuing anyway ninja: WARNING: multiple rules generate ninja/gen/experimental-libraries.o. build will not be correct; continuing anyway ACTION Generating resources from browser/resources/sync_internals_resources.grd STAMP ninja/obj/chrome_extra_resources/actions.stamp STAMP ninja/obj/chrome_extra_resources/chrome/chrome_extra_resources.stamp STAMP ninja/obj/browser/predepends.stamp CXX ninja/obj/browser/chrome/browser/ui/webui/sync_internals_html_source.o AR ninja/obj/browser/chrome/libbrowser.a LINK ninja/chrome (opening about:sync and viewing source doesn't show the added comment) $ ninja -j100 -v packed_extra_resources ninja: WARNING: multiple rules generate ninja/gen/libraries.o. build will not be correct; continuing anyway ninja: WARNING: multiple rules generate ninja/gen/experimental-libraries.o. build will not be correct; continuing anyway touch ninja/obj/packed_extra_resources/predepends.stamp cd chrome; python ../tools/data_pack/repack.py "../ninja//resources.pak" "../ninja/gen/chrome/component_extension_resources.pak" "../ninja/gen/chrome/devtools_resources.pak" "../ninja/gen/chrome/net_internals_resources.pak" "../ninja/gen/chrome/shared_resources.pak" "../ninja/gen/chrome/sync_internals_resources.pak" touch ninja/obj/packed_extra_resources/actions.stamp touch ninja/obj/packed_extra_resources/chrome/packed_extra_resources.stamp (now it does) |
After some fiddling, I have gotten the world to this state: $ touch chrome/browser/resources/sync_internals/sync_index.html I believe the reason it does all the extra work (including relinking) is that grit touches the header file used by that internals_html_source, which causes it to recompile, which causes all the relinking downstream. What do you think, is that desirable behavior? |
It's a shame that grit ends up touching the header file, triggering a link. But I think that's a problem with grit and not ninja. Thanks for looking into this! |
If grit didn't touch the header file, then we would always think the header file is out of date and would re-run grit every time you build. |
I believe this actually works already with ninja trunk, due to the modification to the header.
This makes it difficult for me to judge whether my more complicated "fix" is warranted. |
Wait, I take that back -- it's not rebuilding the pak file. |
And I've confirmed my patch does fix this. Now to just convince myself it doesn't regress anything... :\ |
Fix pushed. |
Repro steps:
chrome/browser/resources/sync_internals/sync_index.html
(add a comment or something)ninja -j100 chrome
Expected results:
stuff in
chrome/chrome_extra_resources.ninja
gets built, andchrome
is rebuilt with the updated resources.Actual results:
ninja does nothing
The text was updated successfully, but these errors were encountered: