Save GHC version in stored pastes
tomsmeding opened this issue · 3 comments
tomsmeding commented
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.
trevorsibanda commented
Hi @tomsmeding I'd like to start on this. Any tips or anything I should be aware of?
tomsmeding commented
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
Save
endpoint inPlay.hs
to 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.mustache
to do the right thing
Let me know if you get stuck!
trevorsibanda commented
Opened a draft PR.
Comments welcome before I move forward tomorrow.