Beta 10.07.2020
This is the third beta release of IHP and also the first release since IHP has been released to the public around two weeks ago.
Since the last release we have merged 180 commits.
Major Changes
- IHP is web-scale now: Support for
<marquee>
and<blink>
tags have been added to HSX (previously HSX reported an error as these tags weren't on the tag whitelist) 🚀 - Code Generator Updates:
- You can now generate views from the code generator. Previously views could only be generated via the controller code generator or by manually adding them.
- Apps like
Web
orAdmin
can now be generated via the web dev tooling. Previously this was only possible from the terminal usingnew-application
. - The action generator now has a checkbox to also generate a view for the action.
- The IHP authentication functions have been fixed and improved to be easier to get started with. There's certainly a lot more to do to make auth easier :-)
- More sql types supported: Using
REAL
andDATE
previously crashed the code generator. This has been fixed now.BIGINT
,TIMESTAMP WITHOUT TIME ZONE
,VARCHAR
, andNUMERIC
are supported now. TheSchema.sql
parser now also knows about certain aliases (e.g.Int
andInteger
are the same in postgres). - Improved Dev Server on Linux: The dev server is now faster and more stable on linux by not using the
-fexternal-interpreter
flag ofghci
. This also fixed a major bug causing the use of sessions to fail in linux development mode. - The dev server now displays all apps available in your project: Previously only the
Web
application was available. When you have other apps like e.g.Admin
orApi
, they will also be shown in the sidebar.
Minor Changes
- Timestamps can be edited via the Schema Designer again. Previously changing a timestamp column via the schema editor has created a syntax error in the Schema.sql file aa4d2926e4301a24ee82b5a4f06102c1fbae9cf0
- Fixed that
.envrc
keeps growing every time you regenerate it. This has been fixed by @madjar 💯 0dfc77159087454fc3b5f892d14cfc234c83d840 - The function
isWeekend
has been renamed totodayIsWeekend
. A new pureisWeekend day
has been added. Thank you @hendi 👍 00757e593318b704a0f41d288fa337e7d9e3afd7 - The
ihp-new
command now checks thatgit
andmake
are available before creating a project - Creating a new column like
date_started_at
ordate_of_birth
in the SchemaDesigner now automatically pre-selectsDATE
as the sql type. By @hendi - The sql parser now supports qualified table names like
public.my_table
- A bug causing
NULL
not being accepted as thenull
sql value has been fixed. - Values of type
Double
can now be used together withfill @'["myField"]
- The first-time generation of the postgres database is more robust now
- When using the
Update DB
,Push To Db
orDump DB
buttons in the Schema Designer, any errors will now be reported to the user - Fixed using IHP scripts not working with a binary version of IHP
- Added
orderByAsc
as an aliasorderBy
- When using a database column name which is a haskell keyword, the generated haskell code will now be suffixed with
_
. Given an sql column likeof
, you have to access the field in your haskell code likerecord |> get #of_
- The dev server now opens the app in the browser in an async way, resulting in faster startup when running
./start
. You can also customize the open command by usingexport IHP_BROWSER=my_custom_browser
. - Snake-caps table names have previously caused the generated haskell code to be broken when used in certain ways. This has been fixed by @ruhatch 🎉
Open Controller
is only shown in the Context Menu of the Schema Designer when the controller exists.Generate Controller
is now only shown when the controller doesn't exist.
Documentation
- The
curl
call to install nix in the installation guide has been fixed by @akashche :) - An incorrect app link and a few typos have been fixed by @Dansvidania 👍
- The
entr
file watcher used for rebuilding the docu locally has been added to the IHP nix-shell - A note on a few edge cases on
Installing IHP on Windows
has been added - A note on installing
curl
,make
andgit
has been added to theInstalling IHP on Linux
section - A new recipe
Using IHP with Visual Studio Code / VSCode
has been added - @waddlaw has fixed a bit of outdated docu :)
- @stianlagstad fixed a small typo
- @nghamilton fixed the documentation on building "beautiful" urls with the IHP router
Community Content
Dario Oddenino started a very cool video series on IHP:
Trying the Integrated Haskell Platform web framework 1/3
Trying IHP part2/3 #ihp #haskell
Trying the Integrated Haskell Platform 3/3
Updating
To update the IHP version of your project, open default.nix
and change the git commit in line 4 to the following:
rev = "fb652b7f96278d3c4607123d3e37a6e0e9c6d5a7";
After that run the following command to update your project:
nix-shell -j auto --cores 0 --run 'make -B .envrc'
In case nix starts rebuilding IHP (might take a while), make sure cachix is set up as expected:
cachix use digitallyinduced
Now you can start your project as usual with ./start
.
If you have any problems with updating, let us know on Gitter.
📧 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 24.07.2020.