Open psibi opened 7 years ago
No objection from me. How does this affect the PR you opened here?
Unfortunately my PR doesn't affect it in any way. With or without my PR, you can reproduce the issue in yesod devel
. But I did found this issue while working on that PR.
What I'm trying to understand is whether that PR is worth continuing with on its own, or if it's better to try to solve both in one step with the added Stack feature.
It is worth continuing as the race condition cannot be solved in Stack itself (I'm open to ideas on how to fix that in the stack). This issue is independent of the other one.
The whole reason the race condition occurs is because of the interaction between the two concurrent process:
Since their interaction is only controlled via yesod-bin, It can be only fixed here.
Got it, thanks for the explanation.
I have added a PR for Stack implementing this required feature: https://github.com/commercialhaskell/stack/pull/3165
The current stack version of
yesod-bin
suffers from this bug in which a yesod development server can always show the "Refreshing page" even when it's built successfully. Step to reproduce:stack exec -- yesod devel
help
It will go to compile mode permanently until you press "enter" again or type "rebuild".
The reason for this is that
atomically $ writeTVar appPortVar (-1)
is called whenever stack build process emits some output.IMO, I think this is better fixed at the Stack tool itself by adding a new feature there. I will create a new issue in the Stack repo if other's agree.