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

Fixing race condition in yesod-bin #1381

Merged
merged 10 commits into from Apr 27, 2017

Conversation

Projects
None yet
2 participants
@psibi
Member

psibi commented Apr 24, 2017

Stack build process emits line even after successful build process
which leads to the overwriting of the appPortVar with -1. This leads
it to a compile mode again. Pressing Return Key and rebuilding it
again makes it go, but that's just a workaround I have to do every now
and then to solve the actual issue.

I'm using a MVar based locking solution for fixing the race
condition introduced.

I have been using this patch for around 3 to 4 days in our workplace and we haven't seen any surprising behavior so far.

psibi added some commits Apr 20, 2017

Fix race condition in yesod-bin
Stack build process emittles line even after successful build process
which leads to the overwriting of the appPortVar with -1. This leads
it to a compile mode again. Pressing Return Key and rebuilding it
again makes it go, but that's just a workaround I have to do every now
and then to solve the actual issue.

I'm using a `MVar` based locking solution for fixing the race
condition introduced.
@snoyberg

I'm not sure I fully grok the change yet, but some relatively superficial comments.

Show outdated Hide outdated yesod-bin/Devel.hs
Show outdated Hide outdated yesod-bin/Devel.hs

psibi added some commits Apr 26, 2017

@psibi

This comment has been minimized.

Show comment
Hide comment
@psibi

psibi Apr 26, 2017

Member

@snoyberg Thanks for the review, I have updated the PR. I have also added DEBUG flag to cabal file which IMO helps during development of yesod-bin. I will remove it if you feel it's not needed.

Member

psibi commented Apr 26, 2017

@snoyberg Thanks for the review, I have updated the PR. I have also added DEBUG flag to cabal file which IMO helps during development of yesod-bin. I will remove it if you feel it's not needed.

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Apr 27, 2017

Member

I'm not opposed to some debugging output, but I'd rather see it happen with a --verbose flag than CPP. I'm indifferent on whether we keep the CPP in for now though.

Member

snoyberg commented Apr 27, 2017

I'm not opposed to some debugging output, but I'd rather see it happen with a --verbose flag than CPP. I'm indifferent on whether we keep the CPP in for now though.

psibi added some commits Apr 27, 2017

@psibi

This comment has been minimized.

Show comment
Hide comment
@psibi

psibi Apr 27, 2017

Member

Thanks for the review. Indeed making it as a single STM block is better. I have updated the PR.

Member

psibi commented Apr 27, 2017

Thanks for the review. Indeed making it as a single STM block is better. I have updated the PR.

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Apr 27, 2017

Member

LGTM, thanks for the update. Merge when ready 👍

Member

snoyberg commented Apr 27, 2017

LGTM, thanks for the update. Merge when ready 👍

@psibi

This comment has been minimized.

Show comment
Hide comment
@psibi

psibi Apr 27, 2017

Member

Thanks, will merge it once the Travis CI passes.

Member

psibi commented Apr 27, 2017

Thanks, will merge it once the Travis CI passes.

@psibi psibi merged commit b9e57a1 into yesodweb:master Apr 27, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@psibi

This comment has been minimized.

Show comment
Hide comment
@psibi

psibi Apr 27, 2017

Member

I would love to see a new release of this version in Hackage.

Member

psibi commented Apr 27, 2017

I would love to see a new release of this version in Hackage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment