Beta 16.10.2020
It's time for the next release of IHP: v20201016 🎉
Major Changes
-
Haskell Language Server Support: You can now get cool IDE features by using Haskell Language Server. It works mostly out of the box after updating to this IHP version. Check out the documentation on how to get it running with your fav editor.
-
Updated NixPkgs Version: We're updating the IHP package set to a newer version. We're moving from
da7ddd822e32aeebea00e97ab5aeca9758250a40
to07e5844fdf6fe99f41229d7392ce81cfe191bcfc
. This means some of your dependencies might get updated. -
OFFSET Support: You can now easily use Postgres
OFFSET
with the query builder:query @User |> limit 25 |> offset 50 |> fetch
-
New Form Helper:
numberField
: Similiar totextField
, renders a<input type="number"/>
.formFor project [hsx| {numberField #maxUsersLimit} |]
-
Automatic Troubleshooting: We've created a script that checks all common issues that often go wrong when setting up IHP (like
direnv
issues,.ghci
permission issues, etc.). When you cannot run your IHP app anymore, run the troubleshooting to find out possible error conditions. You can find more in the Troubleshooting section. -
Sending Emails: Support for sending mails has been added in this release. Use the new code generator to get started 🔥
Other Changes
param @Bool
now acceptstrue
as a truthy value.- Session cookies can be configured in FrameworkConfig. Previously it was not possible to change any options of the session cookie.
- Session cookies are
HttpOnly
andsecure
(only if app is served via https) now - The built-in SessionsController provides a new
beforeLogin
callback. This can be useful to abort the login process when a user is not yet confirmed. urlTo
can now be used everywhere wherepathTo
is used- A
stripTags
function has been added toHaskellSupport
. This function removes all html tags from an input string. - Docu: The recipe
Uploading a user profile picture
now mentions that thepicture_url
should benullable
- Docu: Limit and Offset are documented now.
Id
values such asId Project
now haveOrd
andHashable
instances by default- The action generator has been fixed
- Various tests have been added to test HSX, NameSupport and more
- Several issues with the
Data
Tool have been fixed. E.g. adding a row works again now. - Docu:
Using IHP with Emacs
has been added - Docu:
Using IHP with Vim
has been added - The
textToId
function now also works with text primary keys. Previously it only worked with UUIDs. - The
postgresql-simple
Only
wrapper is now exported to all controllers - Improved support for using a Binary (
BYTEA
) column in a table
Updating
This release requires a few more steps than usual. As we've changed the nixpkgs version, this will also require a lot of redownloading of all packages. Make sure you have good internet and can wait up to 30 minutes to complete the download. We highly suggest to make sure your coffee machine is working before starting the update.
First open default.nix
and change the git commit in line 4 to the following:
rev = "49816c21d34fd7894a956bf7fd997e6ed5243acf";
Open Config/nix/nixpkgs-config.nix
and replace the file with this new version: https://raw.githubusercontent.com/digitallyinduced/ihp-boilerplate/81518e9b66e1e9d3bdf40affa674a7d2cd63f414/Config/nix/nixpkgs-config.nix
After that run the following command to update your project:
# Be aware that this will redownload a lot of files and take lots of time
nix-shell -j auto --cores 0 --run 'make -B .envrc'
make -B build/ihp-lib
# This step is required to get the config files for haskell-language-server
make hie.yaml
Now you can start your project as usual with ./start
.
Check out the docs to get started with haskell language server to get cool IDE features.
If you have any problems with updating, let us know on the IHP forum.
📧 To stay in the loop, subscribe to the IHP release emails. Or follow digitally induced on twitter..
📅 The next release is expected to be released on 30.10.2020.