diff --git a/python/revng/pypeline/pipeline_parser.py b/python/revng/pypeline/pipeline_parser.py index 4568f965d..fd903376a 100644 --- a/python/revng/pypeline/pipeline_parser.py +++ b/python/revng/pypeline/pipeline_parser.py @@ -55,9 +55,16 @@ def parse_pipe( ) bindings.append(container_decls[arg]) - configuration = task.get("configuration", "") + configuration = task.get("configuration") + if configuration is None: + configuration_string = "" + elif isinstance(configuration, str): + configuration_string = configuration + else: + configuration_string = yaml.safe_dump(configuration) + return PipelineNode( - task=pipe_type(configuration), + task=pipe_type(configuration_string), bindings=bindings, ) diff --git a/python/revng/pypeline/schema.yml b/python/revng/pypeline/schema.yml index ad692595f..7705ac8b7 100644 --- a/python/revng/pypeline/schema.yml +++ b/python/revng/pypeline/schema.yml @@ -76,10 +76,11 @@ $defs: description: The name of the pipe. example: my_pipe configuration: - type: string - description: The static configuration for the pipe, if any. - default: "" - example: intel_asm=1 + type: [string, object] + description: | + The static configuration for the pipe, if any. Can be either a string + or an object. If an object the content will be re-serialized in YAML + and passed to the pipe constructor as a string. arguments: $ref: "#/$defs/args" description: The names of the containers to pass to the pipe.