Skip to content

Commit a8f1003

Browse files
authored
Merge pull request #383 from haskell-distributed/monorepo-structure
Monorepo structure and cleanup
2 parents 1003248 + c84a34e commit a8f1003

File tree

329 files changed

+47086
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+47086
-295
lines changed

.github/workflows/cabal.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'website/*/**'
7+
- 'README.md'
8+
pull_request:
9+
10+
jobs:
11+
continuous-integration:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ghc-version:
16+
- "8.10.7"
17+
- "9.0.2"
18+
- "9.2.8"
19+
- "9.4.5"
20+
- "9.6.4"
21+
- "9.8.2"
22+
- "9.10.1"
23+
operating-system:
24+
- "ubuntu-latest"
25+
26+
runs-on: ${{ matrix.operating-system }}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install cabal/ghc
32+
uses: haskell-actions/setup@v2
33+
id: setup-haskell
34+
with:
35+
ghc-version: ${{ matrix.ghc-version }}
36+
cabal-version: '3.12.1.0'
37+
38+
- name: Generate freeze file
39+
run: |
40+
cabal configure --enable-tests --test-show-details=direct
41+
cabal freeze --minimize-conflict-set
42+
43+
- name: Cache cabal work
44+
uses: actions/cache@v4
45+
with:
46+
path: |
47+
dist-newstyle
48+
${{ steps.setup-haskell.outputs.cabal-store }}
49+
# We are using the hash of 'cabal.project.local' so that different levels
50+
# of optimizations are cached separately
51+
key: ${{ runner.os }}-${{ hashFiles('cabal.project', 'cabal.project.local') }}-cabal-install
52+
53+
- name: Build dependencies only
54+
run: cabal build all --only-dependencies
55+
56+
- name: Build all packages
57+
run: cabal build all
58+
59+
- name: Run all tests
60+
run: cabal test all

.github/workflows/distributed-process-ci.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.gitignore

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1-
dist/
2-
dist-newstyle/
3-
.cabal-sandbox
1+
dist
2+
dist-*
3+
cabal-dev
4+
*.o
5+
*.hi
6+
*.hie
7+
*.chi
8+
*.chs.h
9+
*.dyn_o
10+
*.dyn_hi
11+
.hpc
12+
.hsenv
13+
.cabal-sandbox/
414
cabal.sandbox.config
5-
.stack*
6-
stack.yaml.lock
15+
*.prof
16+
*.aux
17+
*.hp
18+
*.eventlog
19+
.stack-work/
20+
cabal.project.local
21+
cabal.project.local~
22+
.HTF/
23+
.ghc.environment.*
24+
.*.swo
25+
.*.swp
26+
_site
27+
.DS_Store

CONTRIBUTING.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,57 @@
1-
See https://github.com/haskell-distributed/cloud-haskell/blob/master/CONTRIBUTING.md.
1+
# Cloud Haskell contributor guidelines
2+
3+
## Building
4+
5+
After cloning, you should be able to build all packages in this repository like so:
6+
7+
```
8+
$ cabal build all
9+
```
10+
11+
You can also build a specific package like so:
12+
13+
```
14+
cabal build <some-package>
15+
```
16+
17+
You can have more control over the behavior of `cabal` by configuring, first. For example, if you want to disable optimizations for faster compilation:
18+
19+
```
20+
$ cabal configure --disable-optimization
21+
$ cabal build all
22+
```
23+
24+
The allowed arguments for `cabal configure` are [documented here](https://cabal.readthedocs.io/en/stable/cabal-project-description-file.html#global-configuration-options).
25+
26+
Tests for all packages can be run with:
27+
28+
```
29+
$ cabal test all
30+
```
31+
32+
or again, you can test a specific package `<some-package>` using:
33+
34+
```
35+
$ cabal test <some-package>
36+
```
37+
38+
### Building with specific dependencies
39+
40+
Often, we want to build a package with a specific version of a dependency, for testing or debugging purposes. In this case, recall that you can always constrain cabal using the `--constraint` flag. For example, if I want to build `distributed-process-async` with `async==2.2.5`:
41+
42+
```
43+
$ cabal build distributed-process-async --constraint="async==2.2.5"
44+
```
45+
46+
## Contributing changes upstream
47+
48+
To contribute changes, you first need a fork. First, fork the `distributed-process` repository following the [instructions here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).
49+
50+
Then publish branches:
51+
52+
```
53+
$ cabal test all # Check that everything works before proceeding.
54+
$ git push --set-upstream <username> <branch-name>
55+
```
56+
57+
Then you can [create a pull-request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to contribute changes back to `distributed-process`.

cabal.project

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages: packages/*/**.cabal
2+
3+
package distributed-process-tests
4+
flags: +tcp

distributed-process-tests/CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

distributed-process-tests/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

distributed-process-tests/Setup.hs

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2024-03-25 David Simmons-Duffin <[email protected]> 0.2.7
2+
3+
* Bump dependencies to build with ghc-9.8.
4+
5+
2018-06-14 Alexander Vershilov <[email protected]> 0.2.6
6+
7+
* Update dependency bounds
8+
* Export all documented functions (Issue #9)
9+
10+
2016-02-16 Facundo Domínguez <[email protected]> 0.2.3
11+
12+
* Update dependency bounds.
13+
14+
# HEAD
15+
16+
* Added initial GenServer module
17+
* Added Timer Module
18+
* Moved time functions into Time.hs
19+
* Added Async API
20+
* Added GenProcess API (subsumes lower level GenServer API)
21+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright Tim Watson, 2012-2013.
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
* Neither the name of the author nor the names of other
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MAJOR TODOs (in no particular order)
2+
3+
- implement Observable for Mailbox
4+
- implement PCopy / pcopy :: PCopy a -> Process () and precv :: Process (Maybe (PCopy a))
5+
- provide InputChannel for PCopy data, i.e.:
6+
7+
data InputChannel a = ReadChan (ReceivePort a) | ReadSTM (STM a)
8+
9+
read (ReadChan rp) = expectChan rp
10+
read (ReadSTM stm) = liftIO $ atomically stm
11+
12+
offer
13+
14+
- implement RoundRobinRouter, ContentBasedRouter
15+
- finish off ResourcePool
16+
- double check we're using NFSerializable where possible/necessary
17+
18+
- implement LocalRegistry (?)
19+
- possibly rationalise Registry with LocalRegistry (?)
20+
- Health checks for services
21+
- Service Monitoring
22+
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
cabal-version: 3.0
2+
name: distributed-process-async
3+
version: 0.2.7
4+
build-type: Simple
5+
license: BSD-3-Clause
6+
license-file: LICENCE
7+
stability: experimental
8+
Copyright: Tim Watson 2012 - 2016
9+
Author: Tim Watson
10+
maintainer: The Distributed Haskell team
11+
Homepage: http://github.com/haskell-distributed/distributed-process-async
12+
Bug-Reports: http://github.com/haskell-distributed/distributed-process-async/issues
13+
synopsis: Cloud Haskell Async API
14+
description: This package provides a higher-level interface over Processes, in which an Async a is a
15+
concurrent, possibly distributed Process that will eventually deliver a value of type a.
16+
The package provides ways to create Async computations, wait for their results, and cancel them.
17+
category: Control
18+
tested-with: GHC==8.10.7 GHC==9.0.2 GHC==9.2.8 GHC==9.4.5 GHC==9.6.4 GHC==9.8.2 GHC==9.10.1
19+
20+
source-repository head
21+
type: git
22+
location: https://github.com/haskell-distributed/distributed-process-async
23+
24+
common warnings
25+
ghc-options: -Wall
26+
-Wcompat
27+
-Widentities
28+
-Wincomplete-uni-patterns
29+
-Wincomplete-record-updates
30+
-Wredundant-constraints
31+
-fhide-source-paths
32+
-Wpartial-fields
33+
34+
library
35+
import: warnings
36+
build-depends:
37+
base >= 4.14 && < 5,
38+
data-accessor >= 0.2.2.3,
39+
distributed-process >= 0.6.1 && < 0.8,
40+
exceptions >= 0.10 && < 1.0,
41+
binary >= 0.8 && < 0.9,
42+
deepseq >= 1.4 && < 1.6,
43+
mtl,
44+
containers >= 0.6 && < 0.8,
45+
hashable >= 1.2.0.5 && < 1.6,
46+
unordered-containers >= 0.2.3.0 && < 0.3,
47+
fingertree < 0.2,
48+
stm >= 2.4 && < 2.6,
49+
time >= 1.9,
50+
transformers
51+
default-extensions: CPP
52+
InstanceSigs
53+
hs-source-dirs: src
54+
default-language: Haskell2010
55+
exposed-modules:
56+
Control.Distributed.Process.Async
57+
other-modules:
58+
Control.Distributed.Process.Async.Internal.Types
59+
60+
test-suite AsyncTests
61+
import: warnings
62+
type: exitcode-stdio-1.0
63+
x-uses-tf: true
64+
build-depends:
65+
base >= 4.14 && < 5,
66+
ansi-terminal >= 0.5 && < 0.9,
67+
distributed-process,
68+
distributed-process-async,
69+
distributed-process-systest >= 0.2.0,
70+
exceptions >= 0.10 && < 1.0,
71+
network >= 2.5 && < 3.3,
72+
network-transport >= 0.4 && < 0.6,
73+
network-transport-tcp >= 0.6 && < 0.9,
74+
binary >= 0.8 && < 0.9,
75+
deepseq >= 1.4 && < 1.6,
76+
-- HUnit >= 1.2 && < 2,
77+
stm >= 2.3 && < 2.6,
78+
test-framework >= 0.6 && < 0.9,
79+
test-framework-hunit,
80+
rematch >= 0.2.0.0,
81+
transformers
82+
hs-source-dirs:
83+
tests
84+
default-language: Haskell2010
85+
ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
86+
default-extensions: CPP
87+
main-is: TestAsync.hs
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
cabal clean
3+
cabal configure --enable-library-profiling --enable-executable-profiling

0 commit comments

Comments
 (0)