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 670537 - Do not ship vala-generated .c files in tarballs
Do not ship vala-generated .c files in tarballs
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: language-support-vala
git master
Other Linux
: Normal normal
: ---
Assigned To: Abderrahim Kitouni
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-21 12:28 UTC by Vincent Untz
Modified: 2012-03-03 11:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not ship vala-generated .c files in tarballs (2.18 KB, patch)
2012-02-22 12:44 UTC, Vincent Untz
needs-work Details | Review
Do not ship vala-generated .c files in tarballs (2.17 KB, patch)
2012-02-24 08:02 UTC, Abderrahim Kitouni
none Details | Review
bgo#670537: Do not ship vala-generated .c files in tarballs (2.46 KB, patch)
2012-02-25 20:34 UTC, Abderrahim Kitouni
committed Details | Review

Description Vincent Untz 2012-02-21 12:28:05 UTC
Now that bug 667851 is fixed, it's important that the tarball only contain the .vala files, and not the generated .c files.

For instance, if I try to build 3.3.90 tarball with vala 0.15, it will fail because the generated files are from vala 0.14.
Comment 1 Johannes Schmid 2012-02-21 21:23:09 UTC
Agreed - patches welcome!

Actually I assume it is just some automake magic...
Comment 2 Vincent Untz 2012-02-22 12:44:31 UTC
Created attachment 208195 [details] [review]
Do not ship vala-generated .c files in tarballs

This is important as tarballs might get built with a different versions
of vala. This introduces a dependency on the vala compiler, but since
vala support requires libvala, this shouldn't be a big issue.

This is based on http://mterry.name/log/2011/10/10/vala-autotool-tricks/

Note that I haven't tested this, can't run a "make dist" for anjuta at the moment...
Comment 3 Abderrahim Kitouni 2012-02-22 21:12:19 UTC
Review of attachment 208195 [details] [review]:

FWIW, this will break distcheck, as automake doesn't support out-of-tree builds when the C files are missing.

::: plugins/language-support-vala/Makefile.am
@@ +38,3 @@
 # Plugin sources
+libanjuta_language_vala_la_VALASOURCES = locator.vala plugin.vala provider.vala report.vala
+libanjuta_language_vala_la_SOURCES = $(libanjuta_language_vala_la_VALASOURCES)

I'd rather not do this, as we don't have mixed C and Vala sources. I prefer to use libanjuta_language_vala_la_SOURCES in the dist-hook below (but this is just a matter of personal preference.)

@Johannes: What do you think about this?

::: plugins/symbol-db/anjuta-tags/Makefile.am
@@ +137,3 @@
+dist-hook:
+	cd $(distdir) && \
+	rm ctags-visitor.c ctags-vala.h

You don't need to rm ctags-vala.h as you removed it from EXTRA_DIST, and automake doesn't know about it.
Comment 4 Johannes Schmid 2012-02-23 20:22:36 UTC
Review of attachment 208195 [details] [review]:

Thanks for the patch.

Overall the patch doesn't work, it breaks make dist. I will have to check but thanks for the link - I hope it is in generally doable to not ship generated files.

::: plugins/symbol-db/anjuta-tags/Makefile.am
@@ +137,3 @@
+dist-hook:
+	cd $(distdir) && \
+	rm ctags-visitor.c ctags-vala.h

This needs to be rm -f at least because those might not exist.
Comment 5 Abderrahim Kitouni 2012-02-24 08:02:22 UTC
Created attachment 208319 [details] [review]
Do not ship vala-generated .c files in tarballs

This is important as tarballs might get built with a different versions
of vala. This introduces a dependency on the vala compiler, but since
vala support requires libvala, this shouldn't be a big issue.
Comment 6 Abderrahim Kitouni 2012-02-24 08:19:13 UTC
Forgot to add a comment: the updated patch fixes make dist, but make distcheck is still broken (and the only fix to this is, AFAICT, not to use automake vala support)

(btw, this obsoletes the first patch)
Comment 7 Johannes Schmid 2012-02-24 10:47:13 UTC
Well, it doesn't only break distcheck it also breaks the distribution of the files of course. What do other projects do? Don't use automake support?
Comment 8 Abderrahim Kitouni 2012-02-25 20:34:27 UTC
Created attachment 208419 [details] [review]
bgo#670537: Do not ship vala-generated .c files in tarballs

I've made it not use automake vala support. Now distcheck fails in the am-project testsuite so I think I didn't break anything
Comment 9 Johannes Schmid 2012-02-26 12:01:06 UTC
It's not really nice but it seems to work.
Comment 10 Sébastien Granjoux 2012-03-03 10:18:01 UTC
(In reply to comment #9)
> It's not really nice but it seems to work.

The last patch from Abderrahim is not committed yet. Do you do it or could I commit it myself?
Comment 11 Johannes Schmid 2012-03-03 11:05:46 UTC
Review of attachment 208419 [details] [review]:

Thanks, committed!