Skip to content

Conversation

@JonathanLorimer
Copy link
Contributor

@JonathanLorimer JonathanLorimer commented Apr 12, 2020

I wasn't sure how to put all of the db entry keys into scope. I made some ad hoc data structures to do so, but if anyone has any suggestions on how to do this better I would be open to them!

Note: I used runIO instead of before or beforeAll because I wanted to have access to the db entry keys. Additionally, I didn't insert the edgeCases when constructing the spec tree because they mess up some of the earlier tests. I had to insert the edgeCases in each it block afterwards, so I would still have access to the keys and they wouldn't pollute the db state.

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

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

Great first pass! I think we can make some further improvements and that'll help.

@JonathanLorimer
Copy link
Contributor Author

@parsonsmatt I made the changes you request. I ended up just making all the tests work with the same setup, as I was having trouble adding a second beforeAll beneath the first one (types weren't checking). I think having the same setup is actually a cleaner approach anyways.

@parsonsmatt
Copy link
Collaborator

parsonsmatt commented Apr 15, 2020

Fantastic, thanks! This is great work 😄

If you'd like, you can add a CHANGELOG entry for persistent-postgresql-2.11.0.0 linking to this PR and taking credit for the work 😄

@parsonsmatt
Copy link
Collaborator

awesome thanks!

@parsonsmatt parsonsmatt merged commit 1dcd43d into yesodweb:master Apr 15, 2020
@JonathanLorimer
Copy link
Contributor Author

Thanks for your guidance on this Matt, I really appreciate it.

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