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

[Bug] Multi-level inheritance is not working #785

Closed
steeling opened this issue Oct 17, 2023 · 1 comment · Fixed by #787
Closed

[Bug] Multi-level inheritance is not working #785

steeling opened this issue Oct 17, 2023 · 1 comment · Fixed by #787
Assignees
Labels
bug Something isn't working resolver runtime Issues or PRs related to kcl runtime including value and value opertions

Comments

@steeling
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The below returns an error, but works when the last commented line is uncommented

schema Metadata:
  environment: str
  region: str
  name: str

schema MySchema1:
  metadata: Metadata

schema MySchema2(MySchema1):
  metadata.environment = "dev"

schema MySchema3(MySchema2):
  metadata.region = "us-east-1"

output = MySchema3 {
  metadata.name = "hello"
  # uncomment the next line to make this work, but I shouldn't have to, as it should be inherited.
  # metadata.environment = "dev"
}

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

I expected the output

output:
  metadata:
    environment: dev
    region: us-east-1
    name: hello

3. What did you see instead (Required)

attribute 'environment' of Metadata is required and can't be None or Undefined

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

kpm 0.3.6

@Peefy Peefy added the bug Something isn't working label Oct 18, 2023
@Peefy Peefy self-assigned this Oct 18, 2023
@Peefy Peefy added this to the v0.7.0 Release milestone Oct 18, 2023
@Peefy Peefy added resolver runtime Issues or PRs related to kcl runtime including value and value opertions labels Oct 18, 2023
@Peefy Peefy changed the title Multi-level inheritance is not working [Bug] Multi-level inheritance is not working Oct 18, 2023
@Peefy
Copy link
Contributor

Peefy commented Oct 18, 2023

We have fixed it in #787, it will be released in version 0.6.1 of kcl. You can refer to it and indicate if there are any further issues. Thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolver runtime Issues or PRs related to kcl runtime including value and value opertions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants