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

Produce more helpful output when module output is overwritten #716

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HT154
Copy link
Contributor

@HT154 HT154 commented Oct 20, 2024

Evaluating this module:

output: String = "abc"

Now produces

–– Pkl Error ––
Expected `output` of module `file:///$snippetsDir/input/modules/invalidOutput1.pkl` to be of type `ModuleOutput`, but got type `String`.

x | output: String = "abc"
                     ^^^^^
at output (file:///$snippetsDir/input/modules/invalidOutput1.pkl)

Resolves #709

@HT154 HT154 force-pushed the handle-overridden-module-output branch from 807587a to c030424 Compare October 20, 2024 21:50
@HT154 HT154 force-pushed the handle-overridden-module-output branch from c030424 to e756a15 Compare October 20, 2024 21:50
@@ -0,0 +1 @@
output: String = "abc"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this problem would be caught right here (override with different type), but I guess that's impossible for now

Co-authored-by: translatenix <[email protected]>
@HT154 HT154 force-pushed the handle-overridden-module-output branch from cb37adb to 9d40f6d Compare October 21, 2024 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal error on mistyping output
2 participants