Skip to content

Mixin is swallowing errors in kcl run and kcl-language-server #1914

Open
@diefans

Description

@diefans

Bug Report

If I define a Mixin with some error (e.g. due to a typo) the whole issue is swallowed/ignored by kcl.

1. Minimal reproduce step (Required)

mixin BrokenMixin:
    something: str = "abc"
    broken_1 = UndefinedSchema {}
    broken_2 = UndefinedSchema("foobar")
    broken_3 = UndefinedSchema

schema Foo:
    mixin [
        BrokenMixin
    ]

foo = Foo {}

2. What did you expect to see? (Required)

   |
11 |     broken_1 = UndefinedSchema {}
   |                ^ name 'UndefinedSchema' is not defined
   |

3. What did you see instead (Required)

foo:
  something: abc
  broken_1: {}

4. What is your KCL components version? (Required)

❯ kcl --version
kcl version v0.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions