Skip to content

Cassius/Lucius changes trigger recompilation #1425

@alx741

Description

@alx741

When a change is made in a cassius or lucius file, the change takes effect immediately and can be observed if the page is refresh within <1s after saving the change to the file (time in which yesod devel hasn't started recompilation yet). Although the change takes effect, yesod devel detects the change in the file system and triggers recompilation of the module that invokes the template file, forcing a ~10s unnecessary wait on the The application isn’t built page.

After saving the change in the template file, the output of yesod devel is:

[ 9 of 11] Compiling Handler.Home ( src/Handler/Home.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/Handler/Home.o ) [templates/homepage.lucius changed]

Followed by usual recompilation output.

A few months ago a change in a cassius or lucius file didn't use to trigger recompilation (reload mode).
Not sure if this new behavior arises from a yesod-bin, or scaffolding update though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions