Skip to content

Skip server rebuilds for change sets that don't resolve to any file mount #12861

Open
@jmooring

Description

@jmooring

I'm not sure if this is a bug or an enhancement... or perhaps there's a good reason for the current behavior.

[[module.mounts]]
source = 'content'
target = 'content'
excludeFiles = ['posts/*']

With the above, when I edit content/posts/post-1.md ...

DEBUG Received System Events: [WRITE         "/home/jmooring/code/hugo-testing/content/posts/post-1.md" WRITE         "/home/jmooring/code/hugo-testing/content/posts/post-1.md"]

Change detected, rebuilding site (#5).
2024-09-19 10:43:59.783 -0700
DEBUG cachebuster: Matching "content/posts/post-1.md" with source "(postcss|tailwind)\\.config\\.js": no match
Source changed /posts/post-1.md
DEBUG 
INFO  build:  step process substep resolve page output change set changes 0 checked 0 matches 0 duration 104.933µs
INFO  build:  step process substep gc dynacache duration 338.639µs
INFO  build:  step process substep collect files 0 files_total 0 pages_total 0 resources_total 0 duration 460.679µs
INFO  build:  step process duration 1.727645ms
INFO  build:  step assemble duration 314.482µs
INFO  build:  step render substep pages site en outputFormat html duration 95.511µs
INFO  build:  step render substep pages site en outputFormat rss duration 92.611µs
INFO  build:  step render pages 0 content 0 duration 449.541µs
INFO  build:  step render deferred count 0 duration 4.045µs
INFO  build:  step postProcess duration 16.526µs
INFO  build:  duration 3.17658ms
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Total in 3 ms
INFO  livereload: build changed 0 files

I can see from the last line that no files have changed, which is good, but it seems like we shouldn't be doing the other stuff.

Tested with hugo v0.135.0-DEV-a619deec1827ea2d601a9b3708d1375c1eca3c5c+extended linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions