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

Replace decodeFile with decodeFileEither #1658

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Jan 27, 2020

The title says it all...

Nothing -> fail $ "Invalid YAML file: " ++ show fp
Just (Object obj)
Left err ->
fail $ "Invalid YAML file: " <> show fp <> " " <> prettyPrintParseException err
Copy link
Member

Choose a reason for hiding this comment

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

It looks like tests are failing on old versions of GHC/base, where <> isn't in scope

yesod                            > /home/vsts/work/1/s/yesod/Yesod/Default/Config.hs:238:40: error:
yesod                            >     • Variable not in scope: (<>) :: m0 a0 -> String -> t1
yesod                            >     • Perhaps you meant one of these:
yesod                            >         ‘<$>’ (imported from Prelude), ‘*>’ (imported from Prelude),
yesod                            >         ‘<$’ (imported from Prelude)
yesod                            >     |
yesod                            > 238 |           fail $ "Invalid YAML file: " <> show fp <> " " <> prettyPrintParseException err

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh my bad. I fixed it but how did you run those tests? By running stack test I didn't see any failures.

Copy link
Member

Choose a reason for hiding this comment

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

I didn't run them, that was continuous integration. It tests against a bunch of different configurations. I don't have exact instructions, but you could copy what CI does to test against different configurations (probably just changing the resolver in the stack file)

@v0d1ch v0d1ch force-pushed the 1655_Replace-decodeFile-with-decodeFileEither branch from 6d11b67 to cfaf517 Compare January 28, 2020 08:19
@MaxGabriel MaxGabriel merged commit 51b4bde into yesodweb:master Jun 26, 2020
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.

2 participants