boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 179 forks source link

Changes to resources are not seen when using sift in 2.8.0 #704

Closed borkdude closed 5 years ago

borkdude commented 6 years ago

Problem Description

Boot development task that worked in 2.7.2 now has problem: changes to resources are not seen anymore.

E.g. when I (slurp (io/resource "issue/core.clj")) and then edit core.clj and evaluate (slurp (io/resource "issue/core.clj")) again, it doesn't see the changes. This is somehow related to the sift task. If I uncomment this line https://github.com/borkdude/boot-sift-issue/blob/master/build.boot#L33 then it works in 2.8.0. It worked in 2.7.2.

Why do I need this to work: I need to see changes to resources, because I load queries from .sql files using HugSQL. E.g.

(hugsql/def-db-fns "dre/db/html/query.sql" {:quoting :ansi})

When I change query.sql I want to be able to re-eval that expression and use the new queries.

Steps to reproduce

Reproducible example:

https://github.com/borkdude/boot-sift-issue/tree/master

Platform details

Platform (macOS, Linux, Windows): macOS Platform version: High Sierra JRE/JDK version (java -version): "1.8.0_45"

Boot details

Boot version: 2.8.0 build.boot present? (yes/no): yes ~/.boot/profile present? (yes/no): no Task name? (if applicable): dev/sift

Please also provide the contents of build.boot and ~/.boot/profile (if applicable).

See: https://github.com/borkdude/boot-sift-issue/tree/master

alandipert commented 6 years ago

This is because of https://github.com/boot-clj/boot/pull/680 which went out with 2.8.0.

We need to decide if we want to keep the change, and there is a suitable alternate workflow, or if we want to revert the change.

alandipert commented 6 years ago

Reverted #680 and pushing 2.8.1 so we can discuss further how we want to proceed.

arichiardi commented 6 years ago

Yep this is due to the behavior change - watch+sift is not eager anymore with that patch it seems, haven't investigated further though /cc @bhagany

alandipert commented 5 years ago

@borkdude did 2.8.1 fix this for you? (Even though it broke call?) If so please feel free to close ticket.