Skip to content

Request textDocument/formatting failed. syntax error near : #6

@rauanmayemir

Description

@rauanmayemir

For a simple build_def like this:

def simple_function(name:str, version:str):
    return build_rule(
        name = name,
        binary = True,
        cmd = "touch $OUT && cat 'hello' > $OUT",
        outs = ["simple"],
    )

Please language server will fail with:

10:42:32.079 WARNING: Error from handler for textDocument/formatting: .build_defs/proto/simple.build_defs:1:26: syntax error near :
[Error - 10:42:32 AM] Request textDocument/formatting failed.
  Message: .build_defs/proto/simple.build_defs:1:26: syntax error near :
  Code: -32603 

It works fine if I don't type hint arguments like def simple_function(name, version):

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