play-haskell
play-haskell copied to clipboard
Save GHC version in stored pastes
Currently when loading a stored paste, the playground just selects the default GHC version, rather than the version selected when the paste was created. This is annoying when wanting to demonstrate behaviour with one particular GHC version.
Hi @tomsmeding I'd like to start on this. Any tips or anything I should be aware of?
Thanks! I expect that you'll need to do the following things:
- Change the database schema in
play-haskell-server/src/DB.hs(don't forget to up the version number) - Write a DB migration script like the existing
migrate_db_N_M.sh - Modify the
Saveendpoint inPlay.hsto take a JSON value instead of plain bytes (look at other endpoints how that might work) -- also looks like that endpoint could use aexitExitEarlyT - Modify the client in
play.mustacheto do the right thing
Let me know if you get stuck!
Opened a draft PR.
Comments welcome before I move forward tomorrow.
I've implemented this in https://github.com/haskell/play-haskell/compare/7eace73a6f7c4f2454a91b0afaf863e302167b8d...3df191ff71a3c2f7775e7ed81b572e2edd47e8a6.