You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that when there are conditions that don’t specify main, it ends up with main = None Text, which becomes "main": null in the generated JSON, and then hpack (reasonably) complains that it doesn’t know what to do with a null.
I think the solution here is to change dhallToJSON expr in
I‘m trying to conditionalize some non-list values, like
Encoding this in Dhall, I end up with
and
emptyBuildOptions
(which allows me to have a list of conditions that don’t all have to specify every field) looks likeThe problem is that when there are conditions that don’t specify
main
, it ends up withmain = None Text
, which becomes"main": null
in the generated JSON, and then hpack (reasonably) complains that it doesn’t know what to do with anull
.I think the solution here is to change
dhallToJSON expr
inhpack-dhall/library/Hpack/Dhall.hs
Lines 129 to 135 in a1b799e
Dhall.JSON.omitNull (dhallToJSON expr)
.It might make sense to use
Dhall.JSON.omitEmpty
instead ofomitNull
, but I haven’t thought through the ramifications of that.The text was updated successfully, but these errors were encountered: