From 85a395769f9d6d4670edf4f46554244ba051c136 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Sun, 3 Nov 2019 16:18:09 +0100
Subject: [PATCH] [PL] Out; Deprecate sec. vars. type attribute.

Update docu and make the attribute optional.
Issue a warning in case it is set.
---
 .../secondary_variables/secondary_variable/a_type.md      | 7 +------
 ProcessLib/Output/CreateSecondaryVariables.cpp            | 8 +++++++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/Documentation/ProjectFile/prj/processes/process/secondary_variables/secondary_variable/a_type.md b/Documentation/ProjectFile/prj/processes/process/secondary_variables/secondary_variable/a_type.md
index c0c5e84d40a..ca579c8f6b3 100644
--- a/Documentation/ProjectFile/prj/processes/process/secondary_variables/secondary_variable/a_type.md
+++ b/Documentation/ProjectFile/prj/processes/process/secondary_variables/secondary_variable/a_type.md
@@ -1,6 +1 @@
-The type of the secondary variable.
-
-Can be <tt>static</tt> for secondary variables that don't need any further
-information from the project file in order to be computed;
-or <tt>dynamic</tt> if the functions providing some of the input data for
-computing the secondary variable are set up at runtime.
+Deprecated. This attribute is no longer used.
diff --git a/ProcessLib/Output/CreateSecondaryVariables.cpp b/ProcessLib/Output/CreateSecondaryVariables.cpp
index 8071e936d4b..d42b78733ae 100644
--- a/ProcessLib/Output/CreateSecondaryVariables.cpp
+++ b/ProcessLib/Output/CreateSecondaryVariables.cpp
@@ -37,7 +37,13 @@ void createSecondaryVariables(
     {
         auto const type =
             //! \ogs_file_attr{prj__processes__process__secondary_variables__secondary_variable__type}
-            sec_var_config.getConfigAttribute<std::string>("type");
+            sec_var_config.getConfigAttributeOptional<std::string>("type");
+        if (type)
+        {
+            WARN(
+                "Secondary variable type specification is deprecated and is "
+                "ignored. All secondary variable types are 'static'.");
+        }
 
         auto const internal_name =
             //! \ogs_file_attr{prj__processes__process__secondary_variables__secondary_variable__internal_name}
-- 
GitLab