Beta 30.10.2020
It's time for the next release of IHP: v20201030 🎉 This release mainly focus on improving existing functionality and making things more stable :)
Major Changes
-
Database Connection Pool: IHP now comes with a new database connection pool. This allows for better scalability and performance when dealing with many queries. It also makes IHP more reliable: In previous versions of IHP, a long running database connection might be closed by the database server when nothing happens for too long. This issue will not happen anymore with the new db connection pool.
-
Live Reloading Improvements: A bug has been fixed that caused the live reloading not to work when a file was changed. Additionally the web-based compiling status view has been rewritten to be more efficient (you can really feel that it's faster now).
-
LocalTime Support: Support for
TIMESTAMP WITHOUT TIME ZONE
has been added. It works similiar to the normal timestamp you already know from IHP, but doesn't store any Timezone information. -
Welcome Page In Project: When generating a new IHP project, the project now contains the initial welcome action as part of the project code. This allows to for more play when just starting out, because now you can just change the welcome view as you like :)
-
Basic Auth: Finally you can have basic auth prompts in IHP. You can use it like this:
instance Controller WidgetsController where beforeAction = basicAuth "sanja" "hunter2" "myapp"
This requires the user to enter
sanja
with passwordhunter2
when trying to access theWidgetsController
. Check the documentation for details.
Other Changes
- The nixpkgs Version used when developing on IHP itself has been updated to reflect the new nixpkgs version used since the last release in IHP apps
- Postgres Array Types can be used from the Schema Designer now. Previously this was only possible by using a code editor and manually editing the
Schema.sql
INSERT, UPDATE, DELETE
queries now work in the custom sql query box inside the IHP Data Editor- We've updated the IHP Readme. Take a look in GitHub
- NixSupport/shell.nix moved to just shell.nix. Good to know when you're doing development on the framework itself
- Enums are placed before tables in the
Schema.sql
. This avoids issues where aCREATE TABLE
statements uses an enum that hasn't been defined yet. - The confirmation then on delete links can be customized using
data-confirm
:<a href={DeleteProjectAction} data-confirm={"Do you really want to delete" <> get #name project <> "?"}>Delete project</a>
- The development-mode not found handler now gives you a hint that you might want to use
js-delete
for your link. - The Troubleshooting section has moved from the GitHub Wiki to the Guide. GitHub Wiki didn't allow for PRs.
- Most build warnings you've seen when building IHP have been fixed
- The application server will not print out the verbose development logs when running production. In production the request log will now be similiar to the log lines from apache. This ensures that e.g. security credentials are not leaked to the application log.
ihp-new
now sets the correct permissions to the.ghci
when starting a new project. This has caused troubles in the past for some new users- The
.stylish-haskell
config file that's part of all IHP projects by default has been updated to work again with the latest IHP version - Lots of documentation updates
Updating
First open default.nix
and change the git commit in line 4 to the following:
rev = "a8030dd1e4041a0353f63d03b4ffb836cb2bd95c";
After that run the following command to update your project:
nix-shell -j auto --cores 0 --run 'make -B .envrc'
make -B build/ihp-lib
Now you can start your project as usual with ./start
.
Aside from all the code changes above we've also updated the IHP website: https://ihp.digitallyinduced.com/ :) First big refresh after IHP has been published around 4 months ago.
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 13.11.2020.