Skip to content

ExpressionTool doesn't check output typesΒ #1811

Open
@GlassOfWhiskey

Description

@GlassOfWhiskey

CWL Specification explicitly states that

The Any type validates for any non-null value.

However, cwtool does not fail when a step produces a null output for a port of type Any. Instead, the behavior is correct for input ports. As a concrete example, the following ExpressionTool should clearly fail, but it doesn't.

#!/usr/bin/env cwl-runner

class: ExpressionTool
requirements: { InlineJavascriptRequirement: {} }
cwlVersion: v1.0

inputs: []

outputs:
  output: Any

expression: "$({'output': null })"

Note also that this file is involved in 2 CWL Conformance tests cases, step_input_default_value_overriden_2nd_step_null and step_input_default_value_overriden_2nd_step_null_noexp. Therefore, it is quite crucial to establish the correct behavior here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions