--exec --file-watch combo not working as expected #2955

Open
tonyday567 opened this Issue Jan 27, 2017 · 4 comments

Projects

None yet

4 participants

@tonyday567

Steps to reproduce

Choose a repo and run:

stack build --exec "echo run me, please!" --file-watch

The echo doesn't echo yet. Type 'help'. The executable then runs eg

stack build --exec "echo run me, please!" --file-watch

help
run me, please!

help: display this help
quit: exit
build: force a rebuild
watched: display watched files
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
quit

Associated with this, build does not seem to force a build.

Expected

I expected the executable to run initially,, before kicking the file-watch cycle in the guts.

Actual

the --exec runs after typing help

version

$ stack --version
Version 1.3.2 x86_64 hpack-0.15.0
@mgsloan
Collaborator
mgsloan commented Feb 1, 2017

Hmm, I can't reproduce this behavior. I immediately get:

mgsloan@computer:~/fpco/stack$ stack build --exec "echo run me, please" --file-watch
run me, please
ExitSuccess
Type help for available commands. Press enter to force a rebuild.

It also works when it needs to do an actual build.

So, not sure what's going on there. Could it have something to do with your terminal setup? That's the only possibility I can think of.

@nrolland @Blaisorblade Since y'all thumbs-up-ed this issue, does that mean you can reproduce it?

@mgsloan mgsloan added the need repro label Feb 1, 2017
@nrolland
Contributor
nrolland commented Feb 1, 2017 edited

I thumbed up because I was looking at Tonyday567 stuff and that seemed almost perfect except for this issue :)

Just tried with stack compiled with some recent git repo version (stack upgrade --source-only --git), and it does work !

can't repro either

@Blaisorblade
Collaborator

I'm sorry for the enthusiasm, can't repro either.
Regarding "force a rebuild", maybe it's giving the wrong expectations—sometimes I expect it to behave like --force-dirty.

@tonyday567

Ahh, yes. The behaviour was on Windows. Just checked on osx and I get the correct ordering of events.

@mgsloan mgsloan added this to the P2: Should milestone Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment