Commit Graph

1327 Commits

Author SHA1 Message Date
Michael Walker
adb8ab6a9b Use haskell/actions/setup instead of mstksg/setup-stack
setup-stack hasn't had a commit in over a year and needs an env var
setting to work around some default github-actions security, so it
seems to be abandonware.
2021-03-20 22:08:19 +00:00
Michael Walker
960763e0e1
Merge pull request #338 from barrucadu/dependabot/github_actions/mstksg/setup-stack-v2
Bump mstksg/setup-stack from v1 to v2
2021-03-20 11:53:22 +00:00
dependabot[bot]
a71bdcc5f9
Bump mstksg/setup-stack from v1 to v2
Bumps [mstksg/setup-stack](https://github.com/mstksg/setup-stack) from v1 to v2.
- [Release notes](https://github.com/mstksg/setup-stack/releases)
- [Commits](https://github.com/mstksg/setup-stack/compare/v1...69e4283faeb7a89f26326daa36e9cc0fa7a023bd)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 11:05:35 +00:00
Michael Walker
f4af8f34ac
Merge pull request #337 from barrucadu/ci-810
Add GHC 8.10 to CI
2021-03-20 11:05:14 +00:00
Michael Walker
71b441e5e2 Add a dependabot configuration file
This will keep the CI actions up to date.
2021-03-20 10:38:54 +00:00
Michael Walker
dab049096c Add GHC 8.10 to CI 2021-03-20 10:17:53 +00:00
Michael Walker
7ab4443e9c
Merge pull request #336 from mimi1vx/patch-1
Update ghc.rst - fix versions of base
2021-03-20 10:17:41 +00:00
Ondřej Súkup
5ec72dbd5b
Update ghc.rst - fix versions of base 2021-03-18 16:30:02 +01:00
Michael Walker
8f453da00f Add Concourse pipeline
Putting the tasks in separate files would be nice, but that doesn't
play so nicely with the path-restricted git resources.  Such a
resource pulls the git version *which changed the path*, not the
latest, so I'd need to pull in a second, unrestricted, input to get
the task files from.

That makes the pipeline look kind of awkward in the UI, so I decided
to just inline the definitions here.
2021-03-15 18:34:45 +00:00
Michael Walker
7fa062198d
Merge pull request #335 from barrucadu/ghc9
Add support for GHC 9.0
2021-03-14 11:38:49 +00:00
Michael Walker
4980bb93c8 dejafu-2.4.0.2 2021-03-14 00:11:23 +00:00
Michael Walker
1dbd4f1f7d concurrency-1.11.0.1 2021-03-14 00:11:23 +00:00
Michael Walker
6dcf804203 Add GHC 9.0 to the supported versions list 2021-03-14 00:11:23 +00:00
Michael Walker
ac0221c1da Fix various compiler warnings
There are still others remaining, but they can't all be fixed if I
want to keep compatibility with older GHC versions.
2021-03-14 00:11:23 +00:00
Michael Walker
2294663de8 Fix Par Monad example test failure
With the ParMonad / "testing exposes a deadlock" / randomly test,
simplification threw an error:

    Exception: (dejafu) Got a different result after simplifying:
    'True' /= 'Abort'

This is failing even with previously supported versions of GHC, so I
think it's a new library version (probably random, giving an original
trace which exposes the bug).

Disabling "safe IO" for this test fixes it, which means that either
the IO is not safe after all, or that there's another bug elsewhere
which is being hidden now that simplification is more
restricted... however, none of the other tests are failing, so I hope
it's just the IO.
2021-03-14 00:11:23 +00:00
Michael Walker
700fb5f1c4 Remove use of . in dejafu-tests (fix for GHC 9.0)
Like the use of `const` in concurrency and dejafu, this doesn't play
nicely with higher ranked types.
2021-03-14 00:11:23 +00:00
Michael Walker
4c98a7f6b7 Remove use of const in dejafu (fix for GHC 9.0) 2021-03-14 00:11:23 +00:00
Michael Walker
349767a7b6 Remove use of const in concurrency (fix for GHC 9.0)
Type inference seems to fall down with the rank-n type of
`forkWithUnmask` + `const`:

    Control/Monad/Conc/Class.hs:525:27: error:
        • Couldn't match type ‘b5’ with ‘forall a. m a -> m a’
          Expected: (forall a. m a -> m a) -> m ()
            Actual: b5 -> m ()
          Cannot instantiate unification variable ‘b5’
          with a type involving polytypes: forall a. m a -> m a
        • In the first argument of ‘forkWithUnmask’, namely ‘(const ma)’
          In the expression: forkWithUnmask (const ma)
          In an equation for ‘fork’: fork ma = forkWithUnmask (const ma)
        • Relevant bindings include
            ma :: m () (bound at Control/Monad/Conc/Class.hs:525:6)
            fork :: m () -> m (ThreadId m)
              (bound at Control/Monad/Conc/Class.hs:525:1)
        |
    525 | fork ma = forkWithUnmask (const ma)
2021-03-14 00:08:18 +00:00
Michael Walker
e64496664e
Merge pull request #333 from barrucadu/dejafu-2401
dejafu-2.4.0.1 release
2020-12-28 01:26:13 +00:00
Michael Walker
fc46e0b5ff dejafu-2.4.0.1 release 2020-12-28 01:04:32 +00:00
Michael Walker
9806335552
Merge pull request #332 from barrucadu/fix-331
Correctly reset new TVar values when restoring snapshots
2020-12-28 01:01:02 +00:00
Michael Walker
86dde99f52 Correctly reset new TVar values when restoring snapshots
This adds the overhead of constructing the effect to every STM
transaction, which I worried would be a large cost; but it turns out
that the overhead is negligible.
2020-12-28 00:04:28 +00:00
Michael Walker
e166641b59 Add a failing test for #331 2020-12-28 00:00:49 +00:00
Michael Walker
3d8f1ff502
Merge pull request #329 from barrucadu/readme-travis
Remove old Travis build indicator from README
2020-12-27 22:31:07 +00:00
Michael Walker
89cfc3363c
Merge pull request #328 from barrucadu/stackage/5795
Support tasty-1.4
2020-12-27 22:30:59 +00:00
Michael Walker
fd74b1ba65 tasty-dejafu-2.0.0.7 release 2020-12-27 22:12:06 +00:00
Michael Walker
cfa86a8baa Make dejafu-tests benchmarks compatible with tasty-1.4
The `opts` param is now passed to `T.foldGroup`, but I don't need it.
2020-12-27 22:12:06 +00:00
Michael Walker
0cc21104ca Bump upper bound of tasty to <1.5
https://github.com/commercialhaskell/stackage/issues/5795
2020-12-27 22:12:06 +00:00
Michael Walker
2dee1cec19 Remove old Travis build indicator from README
We've been using GitHub Actions for a while.
2020-12-27 22:11:59 +00:00
Michael Walker
15c83b933e
Merge pull request #330 from barrucadu/setup-stack
Add workaround for setup-stack incompatibility
2020-12-27 22:11:46 +00:00
Michael Walker
b58439fd1b Add workaround for setup-stack incompatibility
https://github.com/mstksg/setup-stack/issues/13
2020-12-27 21:50:05 +00:00
Michael Walker
d08a7be99f
Merge pull request #325 from barrucadu/fix-324
Fix #324
2020-07-01 00:53:36 +01:00
Michael Walker
9651be88be dejafu-2.4.0.0, hunit-dejafu-2.0.0.4, tasty-dejafu-2.0.0.6 2020-07-01 00:29:37 +01:00
Michael Walker
75eac6693f Remove Bool from Throw/ThrowTo/ThrownSTM actions
If the Maybe MaskingState is Just, then the thread survived; if it's
Nothing the thread was killed.
2020-07-01 00:29:37 +01:00
Michael Walker
9601a78cef Add a ThrownSTM thread action
This is for transactions which throw an exception, rather than
stuffing that information into the `STM` action.  This makes the
traces a bit clearer (eg, you can now tell without needing to inspect
the STM trace if an exception was thrown by a transaction).

I've called this "ThrownSTM" rather than "ThrowSTM" because it's like
"BlockedSTM" (just another failure case), and that's also past tense.
2020-07-01 00:29:37 +01:00
Michael Walker
601c4c8690 Atomically update masking state on jumping to an exc. handler
In this excerpt:

    uninterruptibleMask $ \restore -> fork $ do
      result <- try (restore (throw ThreadKilled))
      ...

The `throw` jumps to an exception handler registered outside the
`restore`, which means there is a masking state change.  Previously,
dejafu handled this by inserting an `AResetMask` action as the first
action of the handler; but this is incorrect, as it opens a potential
race condition with another thread calling `throwTo`.  As `throw` (and
`throwTo`, and an uncaught `throwSTM`) "use up" the exception handler,
this is not a benign race: the thread will be killed!

The solution is to atomically restore the masking state.

This commit implements that, and changes `Throw`, `ThrowTo`, and `STM`
to include the new masking state (if it changed).  I think this is a
bit confusing, so I'll make a follow-up commit to split out a new
`ThrownSTM` action.
2020-07-01 00:29:36 +01:00
Michael Walker
6d74a8977a Add failing tests for #324 2020-07-01 00:29:07 +01:00
Michael Walker
8c4d2e28bc
Merge pull request #326 from barrucadu/random-1.2
random-1.2
2020-06-24 18:15:29 +01:00
Michael Walker
a42851807b tasty-dejafu-2.0.0.5 2020-06-24 17:28:37 +01:00
Michael Walker
297effef37 dejafu-2.3.0.1 2020-06-24 17:28:37 +01:00
Michael Walker
97e0a183ba Correct remaining references to Travis in docs
Spotted this while perusing the Release Process page.
2020-06-24 17:28:37 +01:00
Michael Walker
da8da501bc Relax upper bound on random to <1.3 2020-06-24 17:28:37 +01:00
Michael Walker
57d3c45350
Merge pull request #322 from barrucadu/kill-travis
Remove travis entirely
2020-05-14 20:08:13 +01:00
Michael Walker
fb4383b55a Remove travis entirely
CD is now done with Concourse:
325b5a5b50
2020-05-14 19:49:22 +01:00
Michael Walker
d2afa25506
Merge pull request #321 from barrucadu/github-actions-ci
Use GitHub actions for CI
2020-05-14 15:46:32 +01:00
Michael Walker
85314e4bd7 Use GitHub actions for CI 2020-05-14 15:27:52 +01:00
Michael Walker
72b98f4f9a
Merge pull request #320 from barrucadu/unsafeunmask
Add unsafeUnmask to MonadConc (attempt 2)
2020-05-14 14:37:09 +01:00
Michael Walker
b3eafffc56 hunit-dejafu-2.0.0.3, tasty-dejafu-2.0.0.4 2020-05-14 13:50:12 +01:00
Michael Walker
555f3e682b dejafu-2.3.0.0 2020-05-14 13:50:12 +01:00
Michael Walker
414554d1ef Add unsafeUnmask to dejafu 2020-05-14 13:50:12 +01:00