After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752239 - Missing dependency for python files in build file
Missing dependency for python files in build file
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.45.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-07-10 17:50 UTC by Cor-Paul Bezemer
Modified: 2017-10-11 11:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for adding missing dependencies (1.07 KB, patch)
2015-07-10 17:50 UTC, Cor-Paul Bezemer
committed Details | Review
meson: Improve gdbus-codegen custom target dependencies (3.59 KB, patch)
2017-10-11 10:40 UTC, Nirbheek Chauhan
committed Details | Review

Description Cor-Paul Bezemer 2015-07-10 17:50:55 UTC
Created attachment 307243 [details] [review]
patch for adding missing dependencies

I am a researcher from the Software Analysis and Intelligence Lab (SAIL) from Queen's University in Kingston, Canada.
Currently, we are working on an approach for finding missing dependencies in build files and we are using glib as a case study.
We have found several bugs which I will submit in the following days, together with a patch for fixing them.

The targets:
gdbus-daemon-generated.h gdbus-daemon-generated.c
are depending on the output of gdbus-codegen.in only. If any of these other python files change, the target will not be rebuilt:
$(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in	
$(srcdir)/gdbus-2.0/codegen/codegen_main.py 	
$(srcdir)/gdbus-2.0/codegen/parser.py 		
$(srcdir)/gdbus-2.0/codegen/codegen_docbook.py 	
$(srcdir)/gdbus-2.0/codegen/codegen.py 		
$(srcdir)/gdbus-2.0/codegen/__init__.py 	
$(srcdir)/gdbus-2.0/codegen/dbustypes.py 	
$(srcdir)/gdbus-2.0/codegen/config.py 		
$(srcdir)/gdbus-2.0/codegen/utils.py

The included patch adds these dependencies for the latest HEAD.
We observed that these dependencies are missing since at least version 2.36.0.
Comment 1 Philip Withnall 2017-10-11 09:33:34 UTC
Review of attachment 307243 [details] [review]:

This seems a bit over the top (the likelihood of those files being changed and causing a problem is low), but the patch looks good. Thanks.
Comment 2 Philip Withnall 2017-10-11 09:36:08 UTC
Nirbheek, is this something which Meson already takes care of, or is it something we need to worry about there too?
Comment 3 Nirbheek Chauhan 2017-10-11 10:19:55 UTC
Generally, this is not something meson would be able to automatically account for since the resources that gdbus-codegen uses are opaque to the build system; in this case the modules that it imports from within the source tree.

I looked at the build file, and although the situation is different in meson (we copy all the files to the builddir), we won't regenerate the custom target if these are changed. The fix is easy though, I'll attach it here in a bit.
Comment 4 Nirbheek Chauhan 2017-10-11 10:40:33 UTC
Created attachment 361315 [details] [review]
meson: Improve gdbus-codegen custom target dependencies

Ensure that the custom targets that use gdbus-codegen get rebuilt when
any of the gdbus-codegen files are changed.
Comment 5 Nirbheek Chauhan 2017-10-11 10:41:44 UTC
Forgot to note that to test this you have to actually change the files, not just `touch` them because meson won't replace the built files if the contents haven't changed.
Comment 6 Philip Withnall 2017-10-11 11:22:27 UTC
Review of attachment 361315 [details] [review]:

Looks good to me, thanks!
Comment 7 Nirbheek Chauhan 2017-10-11 11:26:17 UTC
Comment on attachment 361315 [details] [review]
meson: Improve gdbus-codegen custom target dependencies

Attachment 361315 [details] pushed as b444ae0 - meson: Improve gdbus-codegen custom target dependencies