]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gtkmodule: Preserve order of required-gtype-classes for reproducibility
authorNiko Tyni <ntyni@debian.org>
Mon, 19 Oct 2015 20:56:36 +0000 (23:56 +0300)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 2 Mar 2017 10:23:02 +0000 (11:23 +0100)
The elements of current_required_app_classes end up in the generated
code in g_type_ensure() statements. The order of these can vary
between builds when using a HashSet, breaking reproducibilty.

See https://wiki.debian.org/ReproducibleBuilds

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802528

codegen/valagtkmodule.vala

index 07c022e2885cfe867cd4e0033c5b94d6ed08728d..1558469a83b9c45729d8904f2af59f77158e17c3 100644 (file)
@@ -32,7 +32,7 @@ public class Vala.GtkModule : GSignalModule {
        /* GtkBuilder xml child to Vala class mapping */
        private HashMap<string, Class> current_child_to_class_map = new HashMap<string, Class>(str_hash, str_equal);
        /* Required custom application-specific gtype classes to be ref'd before initializing the template */
-       private HashSet<Class> current_required_app_classes = new HashSet<Class>();
+       private List<Class> current_required_app_classes = new ArrayList<Class>();
 
        private void ensure_cclass_to_vala_map () {
                // map C name of gtypeinstance classes to Vala classes