tomjaguarpaw / tilapia

Improving all Haskell's programmer interfaces
65 stars 2 forks source link

Outdated page about sandboxes #45

Closed tomjaguarpaw closed 3 years ago

tomjaguarpaw commented 3 years ago

https://softwaresimply.blogspot.com/2014/07/haskell-best-practices-for-avoiding.html

Migrated from https://github.com/tomjaguarpaw/tilapia/issues/32

tomjaguarpaw commented 3 years ago

I emailed the author via his address on https://github.com/mightybyte/snaplet-postgresql-simple/blob/master/snaplet-postgresql-simple.cabal

one of your old blog posts comes up in web searches for "Cabal".

https://softwaresimply.blogspot.com/2014/07/haskell-best-practices-for-avoiding.html

Thanks for this contribution to the Haskell ecosystem. It's clearly marked "2014", which is great, but to be as sympathetic to needs of users as possible I was wondering if you could consider adding a prominent header like

"WARNING: This page is severely outdated. Do not refer to this page for modern cabal usage."

Out-of-date documentation can be very confusing to new users. See this message from a user just today:

https://mail.haskell.org/pipermail/haskell-cafe/2020-December/133139.html

tomjaguarpaw commented 3 years ago

Doug responded asking which specific points were out of date. My reply:

Hi Doug,

Regarding the specific points, these seem to be out of date:

  1. I make sure that I have no more than the absolute minimum number of packages installed as --global ...

This suggestion is not really necessary anymore after the introduction of v2-builds (and I'm not sure the global/local distinction even exists anymore -- if it does then it certainly doesn't bother me, and it used to a lot!)

  1. Become friends with "rm -fr ~/.ghc" ...

I don't think I've needed to do this since using v2-style commands. It's not strictly wrong but could perhap be de-emphasized.

  1. ... use sandboxes for separate projects or one-off package compiles

Sandboxes are deprecated. Support for them was dropped in 3.2 or will be in 3.4 (I can't remember which).

  1. Don't be afraid to dive into other people's packages

The advice is still wise but it suggests sandboxes which are deprecated. I explain a way that the same can be achieved under "I have a package in local source directory. I want to use it in another local package" at

http://h2.jaguarpaw.co.uk/posts/how-i-use-cabal/

These ones all seem fine. Not out of date:

  1. Make sure ~/.cabal/bin is at the front of your path ...
  2. Install happy and alex manually ...
  3. Make sure you have the most recent version of cabal-install
  4. Learn to use --allow-newer
  5. If you can't make any progress from the build messages cabal gives you, then try building with -v3.

I'm also tracking this at my personal issue tracker, if you prefer to respond there

https://github.com/tomjaguarpaw/tilapia/issues/45

Cheers,

Tom

tomjaguarpaw commented 3 years ago

Waiting for: a response from Doug.

mightybyte commented 3 years ago

I've updated the post.

tomjaguarpaw commented 3 years ago

Thanks so much Doug!