Skip to content

watchTriggers doesn't work as expected. #7130

@visortelle

Description

@visortelle

I use ~ operator to restart my app automatically during development.

I want to exclude my src/main/resources directory from the watch.

I would expect that setting watchTriggers := Seq(baseDirectory.value.toGlob / "*.scala") // (or something like it) as it noted in the documentation would solve my problem. But ~ still triggers a restart if some js/css file is changed in the src/main/resources directory.

[debug] Received event for path /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js
[debug] Received event for path /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map
[debug] Received event for path /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js
[debug] root / reStart - Accepted event for /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map
[debug] Received Update(/Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map,FileAttributes(isDirectory = false, isOther = false,isRegularFile = true, isSymbolicLink = false),FileAttributes(isDirectory = false, isOther = false,isRegularFile = true, isSymbolicLink = false))
[debug] root / reStart - Accepted event for /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js
[debug] Received Update(/Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js,FileAttributes(isDirectory = false, isOther = false,isRegularFile = true, isSymbolicLink = false),FileAttributes(isDirectory = false, isOther = false,isRegularFile = true, isSymbolicLink = false))
[debug] Creating update event for modified /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map (previous stamp: Hash(farm(13713587051bb496)), current stamp: Hash(farm(548334929fffafa9)))
[debug] Creating update event for modified /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js (previous stamp: Hash(farm(25f86e8a4c758909)), current stamp: Hash(farm(c5706fc30c3d281f)))
[debug] Received file event actions: /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map -> Trigger, /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js -> Trigger. Returning: (Update(/Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map, 2023-Jan-13 10:12:36.682 CET),Trigger)
[info] Build triggered by /Users/myuser/projects/project-x/server/src/main/resources/ui/static/dist/entrypoint.js.map. Running 'reStart'.

By setting watchTriggers := Seq(), I would expect that restart won't trigger at all, but it still triggers.

sbt version - 1.8.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions