Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch task should merge new fileset with the one passed to watch task #330

Closed
martinklepsch opened this issue Oct 29, 2015 · 8 comments
Closed
Assignees
Labels

Comments

@martinklepsch
Copy link
Member

No description provided.

@martinklepsch
Copy link
Member Author

@pandeiro reported this in combination with boot reload and boot cljs repl. Some specific ordering was needed. I think things didn't work if repl task came before watch.

@pandeiro
Copy link
Contributor

pandeiro commented Nov 1, 2015

I can come up with a minimal repro next week. Thanks for looking into this
guys.
On Oct 31, 2015 10:37 PM, "Martin Klepsch" notifications@github.com wrote:

@pandeiro https://github.com/pandeiro reported this in combination with
boot reload and boot cljs repl. Some specific ordering was needed. I think
things didn't work if repl task came before watch.


Reply to this email directly or view it on GitHub
#330 (comment).

@pandeiro
Copy link
Contributor

pandeiro commented Nov 2, 2015

So here's an example: https://github.com/pandeiro/jamal/tree/cljs-repl-before-watch

If you compare that branch with master, the only difference is where the cljs-repl task it placed: before and after (watch) , respectively.

@martinklepsch martinklepsch self-assigned this Nov 4, 2015
@martinklepsch
Copy link
Member Author

I created a more minimal reproduction case, will try to figure out what's going wrong.
https://github.com/martinklepsch/watch-bug

@micha let me know if this is expected for some reason.

@micha
Copy link
Contributor

micha commented Nov 4, 2015

@martinklepsch thanks for the repro case, I see what the problem is now. 👍 🚀

@martinklepsch
Copy link
Member Author

@micha I just found it too! 😄

@micha
Copy link
Contributor

micha commented Nov 4, 2015

(defn reset-fileset
  "Updates the user directories in the fileset with the latest project files,
  returning a new immutable fileset. When called with no args returns a new
  fileset containing only the latest project files."
  [& [fileset]]
  (let [fileset (when fileset (rm fileset (user-files fileset)))]
    (sync-user-dirs!)
    (-> (new-fileset)
        (add-user-asset (first (user-asset-dirs)))
        (add-user-source (first (user-source-dirs)))
        (add-user-resource (first (user-resource-dirs)))
        (update-in [:tree] merge (:tree fileset)))))

@micha micha assigned micha and unassigned martinklepsch Nov 4, 2015
@micha micha closed this as completed in f2e1c59 Nov 4, 2015
micha added a commit that referenced this issue Nov 4, 2015
Reset fileset should merge changes on top of source files (fixes #330)
@micha micha removed the in progress label Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants