Server for stable, curated Haskell package sets
Go to file
Alexey Kuleshevich f5e147ab97
Integration with Pantry and usage of new stackage-snapshots:
* Moved all extensions into modules that are using them, rather than globally,
  since they mess up ghci session and introduce conflicts among
  packages. Removed those from `.ghci` file as well
* Redesigned the schema to use Pantry and moved it into it's own module
* Switched all of the db and cron related stuff to RIO. Yesod part is
  still on classy-prelude
* Got pantry to update stackage-server database from hackage
* Got import of stackage-snapshots implemented
* Moved some logic from all-cabal-tool
* Switched everything to `PackageNameP`, `VersionP`, etc. from a la Text.
* Fixed haddock, so it now does proper redirects and pipes the docs
  correctly. Also implemented piping of json files from S3 bucket,
  so index-doc.json is also served by stackage-server thus making
  Ctrl+S feature work properly on haddock. Fix for commercialhaskell/stackage#4301
* Import of modules is done through cabal file parsing, which slows
  down the initial import process drastically, but incremental update
  is not a problem.
* Just as with modules, dependencies are also imported from cabal file.
* In general improved type safety by introducing a few data types:
  eg. `ModuleNameP`, `HackageCabalInfo`, and many more.
* Implemented pulling of deprecation map from hackages and storing it in db
* Implementation of forward/backward dependencies within a snapshot only.
* Drastically improved performance of cron import job, by checking which
  snapshots are not up to date
* Implemented pulling haddock list from S3 bucket. Modules that have
  documentation are marked from the availability of actual haddock. This
  process happens concurrently with snapshots loading.
* Rearranged modules a bit:
  * github related functions went into it's own module
  * cron related functions where moved from Database to Cron module
  * Split up some functions to reduce individual complexity
* Parallelized package loading in cron job
* Implemented parsed cabal file caching.
* All queries where reqritten with esqueleto
* Syntactic improvements:
  * Added stylish-haskell config
  * Formatted all imports and extensions with stylish-haskell.
  * Fixed inconsistent indentation across all modules
* Many improvements to the package page as well as few others.
* Reimplemented hoogledb creation.
* Dropped dependency on tar in favor of tar-conduit
* Added cli for stackage-server-cron
* Add cabal sha and size to the package page
* Fixed links in hoogle searches. Improved type safety for a hoogle handler
* satckage-server-cron is customizable with cli arguments

Final adjustments for the new stackage server release:

* Upgrade to lts-13.16.
* Stackage server related code has been merged to pantry. Made the code
  compatible with the newer version pantry
* Added cli '--snapshots-repo'
* Add readme to package page
* Adjust snapshots expected format:
  * Added `publish-time`
  * Removed name `field`
  * `compiler` field is now in the `resolver` field with fallback to
    the root
2019-04-30 17:10:33 +03:00
.azure Move to Azure 2019-04-30 16:28:42 +03:00
app Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
config Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
design New homepage and new top nav (#52) 2014-12-14 20:18:40 +01:00
etc Adds explicit redirect to www 2019-03-27 15:25:40 +01:00
src Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
static Enable synopsis back 2018-03-14 03:50:16 +05:30
templates Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.dir-locals.el Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.ghci Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.gitignore Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.gitlab-ci.yml Merge branch 'master' into production-deployment 2019-03-17 17:09:24 +01:00
.hindent.yaml Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.stylish-haskell.yaml Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
LICENSE Root file fixes 2017-12-11 18:54:27 +02:00
package.yaml Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
README.md Make it more clear 2018-08-25 23:49:43 +05:30
stack.yaml Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00

stackage-server

Build Status

Server for stable, curated Haskell package sets

This repo is part of the Stackage project, and the live server can be viewed at https://www.stackage.org.

Building locally

Build locally by passing the dev flag to it:

$ stack build . --flag stackage-server:dev

Now, initially you need to run the cron job to create and populate the database:

$ export PGSTRING=postgresql://postgres:password@localhost:5432/stackage
$ stack exec stackage-server-cron

Note that you need to modify the PGSTRING environment variable according to your actual database configuration. Also, you need to create an empty database before running the cron job. Note that it takes quites some time for it to load your database.

After this, run the stackage server:

$ export PGSTRING=postgresql://postgres:password@localhost:5432/stackage
$ stack exec stackage-server