From f604ad92cb61109b264b45d15dbe7d2c6aac6bdf Mon Sep 17 00:00:00 2001
From: Benjamin Schubert <contact@benschubert.me>
Date: Thu, 28 May 2020 10:20:01 +0000
Subject: element.py: Always expand public data's variables

This fixes a bug introduced by d7d18c1a2e454c507afd9e1d3f1358639dd43871,
where public data integration commands and others would never get their
data expanded and would thus fail to run.

The previous however revelead a previous bug, where variables values in
public data of elements would not be part of the cache key of an element
or it's reverse dependencies, and thus, on variable change, rebuilds
would not happen when they would have been needed.

This ensures that all the public data is always resolved and part of the
element's cache key. This however will bring a rebuild of an element
whenever its integration commands variables change, which is simpler to
handle than to try to push that responsibility on reverse dependencies,
since public data can contain plugin-defined values.
---
 tests/format/variables/public_data_variables/public.bst | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 tests/format/variables/public_data_variables/public.bst

(limited to 'tests/format/variables/public_data_variables/public.bst')

diff --git a/tests/format/variables/public_data_variables/public.bst b/tests/format/variables/public_data_variables/public.bst
new file mode 100644
index 000000000..e5273e89a
--- /dev/null
+++ b/tests/format/variables/public_data_variables/public.bst
@@ -0,0 +1,11 @@
+kind: import
+
+sources:
+  - kind: local
+    path: public.bst
+
+public:
+  integration-commands:
+    - echo %{expand-me}
+
+  test: "%{expand-me}"
-- 
cgit v1.2.1

