Skip to content

v0.17.0 (Beta 14.12.2021)

Choose a tag to compare

@mpscholten mpscholten released this 14 Dec 10:23
· 2100 commits to master since this release

IHP v0.17.0 is out now

A new IHP release with new features and many bug fixes 🚀

IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix. Blazing fast, secure, easy to refactor and the best developer experience with everything you need - from prototype to production.

Major Changes

  • 💽 Improved Migration Workflow:
    Since v0.16.0 IHP is already automatically generating a migration prefilled with the recommended changes that need to be applied to your database. Previously IHP was tracking all changes you've made in the Schema Designer and re-applied them to the migration sql file.

    With this release the approach has been changed to a database diffing approach: IHP will now diff the Schema.sql against your local database and generate a efficient patch to bring both in sync again.

    This also affects the local dev tools. The Update DB button has been removed entirely. When there are unmigrated changes locally, the Schema Designer will suggest you to generate and run a migration, like this:

    image

  • 👨‍💻 Optional HSX Attributes:
    HSX gained special handling for Maybe values to make it easy to deal with optional attributes.

    You can write

    let
        target :: Maybe Text
        target = Just "_blank"
    in
        [hsx|<a target={target} />|]

    and it will render to:

    <a target="blank" />

    Using Nothing results in the target attribute not being in the output HTML:

    let
        target :: Maybe Text
        target = Nothing
    in
        [hsx|<a target={target} />|]

    This will render to:

    <a />
  • :atom: DataSync Updates:
    IHP DataSync now uses React Functional Components instead of Class based approach used in previous versions::

    function TodoList() {
        const todos = useQuery(query('todos'));
    
        if (todos === null) {
            return <div className="spinner-border text-primary" role="status">
                <span className="sr-only">Loading...</span>
            </div>;
        }
    
        return <div>
            {todos.map(todo => <div>{todo.title}</div>)}
        </div>
    }

    Additionally this release contains many bug fixes for DataSync and large performance and usability improvements.

  • 🧰 Haskell Language Server: Performance Improvements
    We've updated the Haskell Language Server from 1.4.0.0 to the latest version 1.5.1.0.

    With HLS 1.5.1.0 the performance should be much better. If you're curious, here's a nice presentation of what has changed in HLS.

    If you still have performance issues, please submit issues directly here haskell/haskell-language-server#2340

  • 📫 Encrypted SMTP
    When configuring the IHP Mailer to use SMTP, you can now specify the encryption by setting the encryption field:

    import IHP.Mail
    
    config :: ConfigBuilder
    config = do
        option $ SMTP
            { host = "smtp.myisp.com"
            , port = 2525
            , credentials = Nothing
            , encryption = STARTTLS -- <-- NEW
            }

Other Changes

Full Changelog: v0.16.0...v0.17.0

Feature Voting

Help decide what's coming next to IHP by using the Feature Voting!

Updating

→ See the UPGRADE.md for upgrade instructions.


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.