agrafix / agrafix/elm-bridge

Issue with UTCTime to Posix

Aberta
#52 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Elm
Estrelas
107
Forks
28
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

It would appear that there are default alterations `UTCTime` that convert fields into `Posix`.
That's great, but it doesn't seem to be followed through in the generated code.

For example, it will correctly rename the field, but it does not import Time and uses a decoder called `jsonDecPosix` (autogenerated naming). That decoder does not exist.

Is there another way around this issue? Is there something I'm missing? We are using servant-elm but I tried directly through elm-bridge and got the same results.

This is an example (ignore the silly naming) from the generated code:
```
type alias FweetDto =
{ fwuser: FwuserDto
, fwody: String
, fwimestamp: Posix
}

jsonDecFweetDto : Json.Decode.Decoder ( FweetDto )
jsonDecFweetDto =
Json.Decode.succeed (\pfwuser pfwody pfwimestamp -> {fwuser = pfwuser, fwody = pfwody, fwimestamp = pfwimestamp})
|> required "fwuser" (jsonDecFwuserDto)
|> required "fwody" (Json.Decode.string)
|> required "fwimestamp" (jsonDecPosix)```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.