Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing commas in metadata (meta/parameter_meta) arrays not allowed #708

Open
adthrasher opened this issue Jul 24, 2024 · 0 comments
Open
Labels
interop Bears on spec compatibility

Comments

@adthrasher
Copy link

I have run in to a case with our documentation where miniwdl flags a trailing comma in an array in a meta or parameter_meta section as problematic.

For example:

version 1.1

task foo {
    parameter_meta {
        bar: {
            suggestions: [1,2,3,],
            help: "bar",
            default: 1,
        }
    }
    input {
        Array[Int] bar = [1,2,3,]
    }
    
    command <<< >>>
}

Yields:

% miniwdl check tools/test.wdl
(tools/test.wdl Ln 6 Col 33) Unexpected token Token('STRING1_FRAGMENT', '],\n            help: "bar",\n            default: 1,\n        }\n    }\n    input {\n        Array[Int] bar = [1,2,3,]\n    }\n    \n    command <<< >>>\n}\n') at line 6, column 33.
Expected one of: 
        * FALSE
        * SIGNED_FLOAT
        * LBRACE
        * NONE
        * TRUE
        * FLOAT
        * ESCAPED_STRING
        * LSQB
        * INT
        * SIGNED_INT
        * ESCAPED_STRING1
Previous tokens: [Token('COMMA', ',')]

                suggestions: [1,2,3,],

I don't see this as being disallowed by the spec. I will note that the trailing comma is accepted for declarations.

@mlin mlin added the interop Bears on spec compatibility label Nov 20, 2024
@mlin mlin added this to miniwdl Nov 20, 2024
@github-project-automation github-project-automation bot moved this to Backlog in miniwdl Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Bears on spec compatibility
Projects
Status: Backlog
Development

No branches or pull requests

2 participants