An unexpected error has occurred. Would you mind filing a bug report? #315

Closed
opened 2025-12-30 01:23:28 +01:00 by adam · 2 comments
Owner

Originally created by @kaihendry on GitHub (Jun 9, 2025).

Minimal Repro: https://github.com/kaihendry/pkl-env

Originally created by @kaihendry on GitHub (Jun 9, 2025). Minimal Repro: https://github.com/kaihendry/pkl-env
adam closed this issue 2025-12-30 01:23:29 +01:00
Author
Owner

@StefMa commented on GitHub (Jun 9, 2025):

Its because each module has a output property.
See https://pkl-lang.org/package-docs/pkl/current/base/Module#output

Basically you're not allowed to create a class named output.

Playground example
https://pkl-playground.vercel.app/?share=race-coal-show

Naming it Output however works. https://pkl-playground.vercel.app/?share=pick-push-manner

Pkl should propably prevent this by raising a correct error 🤷‍♂️

@StefMa commented on GitHub (Jun 9, 2025): Its because each module has a `output` property. See https://pkl-lang.org/package-docs/pkl/current/base/Module#output Basically you're not allowed to create a class named `output`. Playground example https://pkl-playground.vercel.app/?share=race-coal-show Naming it `Output` however works. https://pkl-playground.vercel.app/?share=pick-push-manner Pkl should propably prevent this by raising a correct error 🤷‍♂️
Author
Owner

@kaihendry commented on GitHub (Jun 9, 2025):

Thank you! I have another question over here: https://github.com/apple/pkl/discussions/1096

@kaihendry commented on GitHub (Jun 9, 2025): Thank you! I have another question over here: https://github.com/apple/pkl/discussions/1096
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#315