yesodweb / yesodweb/persistent

Make the definition types abstract

Open
#920 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

Currently the SqlBackend and *Def types are all completely exposed. Adding extra functionality to the persistent library requires a breaking change version bump.

We should make these types abstract from the general interface so that additions to the data types are not a breaking change, and we can add functionality in minor version bumps.

We can put them in a persistent-core package per "internal convention is a mistake" or we can do the Internal module. I don't have a strong preference here.

This is a pretty big change, so I anticipate it'll go in as 3.0. I'll find some other issues/enhancements to slot in there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the exposed SqlBackend and *Def types in the persistent library and reviewing how a persistent-core package or Internal module would fit the current interface. Compare both organization options and determine how the public types can become abstract without breaking backend functionality. Done means additions to data types can be released in minor versions rather than requiring a breaking-change bump.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
database
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.