From 7ec0e568488b70b4b8a59dc7917b3a45790ad062 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Sun, 12 Apr 2020 01:25:21 +0000 Subject: [PATCH] style: Build mako-generated stylo rust sources deterministically. Differential Revision: https://phabricator.services.mozilla.com/D70633 --- components/style/properties/helpers.mako.rs | 2 +- components/style/properties/properties.mako.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 6811fd077f2..9baab22cb45 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -737,7 +737,7 @@ aliases.append(alias) %> % if aliases: - #[parse(aliases = "${','.join(aliases)}")] + #[parse(aliases = "${','.join(sorted(aliases))}")] % endif % endif ${to_camel_case(variant)}, diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index d48e5c37464..aed30c9c169 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -312,7 +312,7 @@ impl Clone for PropertyDeclaration { trait AssertCopy { fn assert() {} } trait AssertNotCopy { fn assert() {} } impl AssertCopy for Helper {} - % for ty in set(x["type"] for x in others): + % for ty in sorted(set(x["type"] for x in others)): impl AssertNotCopy for Helper<${ty}> {} Helper::<${ty}>::assert(); % endfor @@ -789,7 +789,7 @@ static ${name}: LonghandIdSet = LonghandIdSet { /// via logical resolution. #[derive(Clone, Copy, Eq, Hash, PartialEq)] pub enum LogicalGroup { - % for group in logical_groups.keys(): + % for group in sorted(logical_groups.keys()): /// ${group} ${to_camel_case(group)}, % endfor