Skip to content

Fix reload after rebuilds of the target extension#2038

Merged
jwoertink merged 1 commit into
luckyframework:mainfrom
wout:fix-full-reload-for-css-with-cr-file-changes
Apr 20, 2026
Merged

Fix reload after rebuilds of the target extension#2038
jwoertink merged 1 commit into
luckyframework:mainfrom
wout:fix-full-reload-for-css-with-cr-file-changes

Conversation

@wout
Copy link
Copy Markdown
Contributor

@wout wout commented Apr 20, 2026

Purpose

Fixed unnecessary reloads for watched files that are not the target build type.

Description

A reload should not be triggered when watching Crystal files to do a CSS rebuild. Only changes to CSS files should trigger a CSS reload. This is precisely what we touched on before, Bun is responsible for reloads after front-end asset changes, Lucky is responsible for the backend. I came across this when working on the Bun setup with Tailwind for the Lucky website.

Sorry for all those tiny PR's BTW 😬. If this bothers you we could extract the JS part into a separate repo and register is as a git submodule.

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

A reload should not be triggerd when watching Crystal files to do a CSS
rebuild. Only changes to CSS files should trigger a CSS reload.
Copy link
Copy Markdown
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. Since I haven't started the release process yet, it's fine. Might as well get it correct when it goes out!

I did wonder about the volatility of front-end though... Having it locked into a whole Lucky release could make that hard... Though, on the other hand, if it's just patches and bug fixes, I'm ok doing patch release on the Lucky shard itself which doesn't require an entire ecosystem update. I say we just leave as-is for now and see how that goes before we get too wild with it.

Thanks!

@jwoertink jwoertink merged commit 35a075d into luckyframework:main Apr 20, 2026
9 checks passed
@wout
Copy link
Copy Markdown
Contributor Author

wout commented Apr 20, 2026

Okay, great.

On volatility: I think we're mostly done. The few recent changes were needed to make the TailwindCSS setup work in the website repo. That's all done now. It works exactly as before again.

If anything comes up after the 1.5.0 release, I'll group the changes and create a PR when it's worthy of a patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants