GNOME Bugzilla – Bug 673101
resource compiler dependency generation not working for generated files
Last modified: 2016-08-23 02:30:04 UTC
Supposed the resource file contains a <file> that doesn't exist yet because it's autogenerated by some other rules. Now --generate-dependencies will error out since it cannot find that file in any --sourcedir directories. I think --generated-dependencies should just print the files as-is, without trying to resolve them to source directories.
Created attachment 293629 [details] [review] Fix resource compiler dependency generation for generated files Don't require that files can be resolved when generating dependencies.
ping?
*** Bug 752884 has been marked as a duplicate of this bug. ***
This is a little difficult in the general case. If you specify multiple --sourcedir arguments, we have to scan the directories to find the one the file is actually in.
(In reply to Matthias Clasen from comment #4) > This is a little difficult in the general case. If you specify multiple > --sourcedir arguments, we have to scan the directories to find the one the > file is actually in. It still does that and will use a file found in one of the source directories if possible. However, if it cannot find the file it will assume that the file will be built and is in the builddir.
That sounds ok then. Would be good to have a test for this behavior
(In reply to Matthias Clasen from comment #6) > That sounds ok then. Would be good to have a test for this behavior Well I did include a basic test case in the patch, don't really know what else is desired past that...
Oh, I was looking for a test that would run glib-compile-resources with various commandline options, and verifies that the produced output matches whats expected.
Review of attachment 293629 [details] [review]: ok then
Review of attachment 293629 [details] [review]: patch doesn't apply cleanly anymore
Created attachment 329105 [details] [review] glib-compile-resources: correct resource compiler dependency for generated files Update the patch to apply against master. Thanks Christian Hergert for pointing me here, and Garret Regier for working on the first patch.
Review of attachment 329105 [details] [review]: I only gave this one a superficial review, going my mclasen's r+ here mostly.
Attachment 329105 [details] pushed as 5411a18 - glib-compile-resources: correct resource compiler dependency for generated files
That commit triggers a breakage during gnome-calculator-3.20.2 build with: > No rule to make target 'history-entry.ui', needed by 'resources.c'. I tested that reverting 5411a18 from glib-2.48.2 makes it succeed again. Do you see how to fix that? I'm completely unfamiliar with glib/gnome build system etc. Downstream link: https://github.com/NixOS/nixpkgs/issues/17912 Full build log: http://hydra.nixos.org/build/38984080/nixlog/1/raw
(In reply to Vladimír Čunát from comment #14) > That commit triggers a breakage during gnome-calculator-3.20.2 build with: > > No rule to make target 'history-entry.ui', needed by 'resources.c'. This is a bug in gnome-calculator. history-entry.ui and history-view.ui are in the data directory in git but not in the dist tarball. This is already fixed in master by commits d746da96 and d5b2a1f9 but still broken in the gnome-3-20 branch.