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

Nested schema instantiation does not error on missing attribute #669

Closed
yamin-oanda opened this issue Aug 18, 2023 · 2 comments · Fixed by #672
Closed

Nested schema instantiation does not error on missing attribute #669

yamin-oanda opened this issue Aug 18, 2023 · 2 comments · Fixed by #672
Labels
bug Something isn't working runtime Issues or PRs related to kcl runtime including value and value opertions

Comments

@yamin-oanda
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Compile the following program:
schema S:
  a: int
  b: str

schema L:
  ss: [S]

# S { b = "b" }
L { ss = [S { b = "b" }] }
  1. Then uncomment the commented line and compile.

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

  1. Instantiating the S schema nested inside the L schema (on the last line) is missing a required attribute, that should be a compile error.
  2. There should be a compile error.

3. What did you see instead (Required)

  1. Compiles successfully and outputs:
ss:
- b: b
  1. There is now a compile error as expected when instantiating at the top level.

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

Reproduced with:

kcl --version
Version: 0.5.1-20ab3eb4b9179219d6837a57f5d35286
Platform: aarch64-apple-darwin
GitCommit: 18297873c31a1feb2a36a983e0f8f10f0c476da8
@Peefy Peefy added bug Something isn't working runtime Issues or PRs related to kcl runtime including value and value opertions labels Aug 18, 2023
@Peefy Peefy added this to the v0.6.0 Release milestone Aug 18, 2023
@Peefy
Copy link
Contributor

Peefy commented Aug 18, 2023

Thank you for your feedback. It will be available in v0.5.5 version next Wednesday. (2023.08.23)

@yamin-oanda
Copy link
Author

Thank you, I'll definitely test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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