bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
370 stars 107 forks source link

Migration proposal: Drop `Database` #246

Closed parsonsmatt closed 3 years ago

parsonsmatt commented 3 years ago

We want to migrate folks to the Experimental syntax as the default, but we also don't want to break anyone's code that hasn't migrated.

Thought: Declare Esqueleto the new module name for the default interface. Deprecate Database.Esqueleto.* and have a temporary Esqueleto.Legacy that we can put folks on.

charukiewicz commented 3 years ago

Personally, I think it's valuable to stick to the convention that database related things are in the Database.* namespace. I think every database related package I've seen follows this convention. I think this is particularly important for Esqueleto, since it relies on Database.Persist.

My proposal/assumption for how this migration would take place is as follows:

Esqueleto 3.x Esqueleto 4.x
Old syntax Database.Esqueleto Database.Esqueleto.Legacy
New syntax Database.Esqueleto.Experimental Database.Esqueleto

My thinking here is that assuming 4.0 is the cutoff, you're going to have compiler errors regardless of whether you've already adopted the Experimental syntax and regardless of what the new module names are. If you've been using Database.Esqueleto then you will need to rename it to Database.Esqueleto.Legacy and if you've been using Database.Esqueleto.Experimental then you will need to rename it to Database.Esqueleto.

To me it seems that adjusting your imports will be necessary regardless whether the new stuff is namespaced under Database or not. If there's a scenario I'm not considering here, please let me know.

parsonsmatt commented 3 years ago

Fair. I'll leave the Database prefix on