Skip to content

Commit 3cdd7cf

Browse files
⅄ trunk → 25-05-22-synhash
2 parents 9fc1641 + fee952d commit 3cdd7cf

File tree

12 files changed

+3580
-198
lines changed

12 files changed

+3580
-198
lines changed

.github/workflows/cabal.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
### Cabal is not supported by Unison. This workflow helps us keep the contributed cabal.project file in a good state,
2+
### but it is not a required workflow.
3+
4+
### IMPORTANT: This workflow is loaded from the _target branch_ of the PR. That means that changes to it won’t take
5+
### effect until after they are merged. To test changes to this workflow, replace `pull_request_target` with
6+
### `pull_request` and open the PR from the same repo that it’s being merged into (not a fork). Remember to
7+
### change back to `pull_request_target` before merging.
8+
9+
name: Cabal
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
on:
16+
# Run on the post-merge result of every push to a PR that changes one of the relevant build files.
17+
pull_request_target:
18+
paths:
19+
- '**.cabal'
20+
- '**/cabal.project*'
21+
# stack.yaml is included, because if it changed, it indicates that cabal.project probably needs to change.
22+
- '**/stack.yaml'
23+
# Allow manual runs
24+
workflow_dispatch:
25+
26+
permissions:
27+
pull-requests: write
28+
29+
jobs:
30+
smoke-test:
31+
# Only build on one platform, because we’re mostly just checking that the cabal.project file is sane.
32+
runs-on: ubuntu-24.04
33+
steps:
34+
# Since we’re using `on.pull_request_target`, this workflow would check out the code from the target branch by
35+
# default. This step fetches the SHA for the merge commit, so we can check out that (as `on.pull_request` would
36+
# do).
37+
- uses: suzuki-shunsuke/get-pr-action@b002e41164d7a39586b41f17f9caca4e98a1efe4 # v0.1.0
38+
id: get-pr
39+
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
with:
42+
ref: ${{steps.get-pr.outputs.merge_commit_sha}}
43+
44+
- id: setup-haskell
45+
uses: haskell-actions/setup@7909071ceec0344debcc968c6c7a96a52e8dd0d7 # v2.8.1
46+
with:
47+
ghc-version: '9.6.5' # Should match the version implied by the resolver in ../../stack.yaml.
48+
cabal-version: '3.10.3.0' # Should match the version in ../../.vscode/settings.json.
49+
50+
- name: cache Cabal build artifacts
51+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
52+
with:
53+
path: |
54+
${{ steps.setup-haskell.outputs.cabal-store }}
55+
dist-newstyle
56+
key: cabal-freeze-${{ hashFiles('**/cabal.project.freeze') }}
57+
restore-keys: |
58+
cabal-freeze
59+
60+
# --only-configure skips some build steps, but should ensure all dependencies are correct.
61+
- id: build
62+
run: cabal build all --only-configure --project-file contrib/cabal.project
63+
continue-on-error: true
64+
65+
- uses: mainmatter/continue-on-error-comment@b2606cc5ef2525ec21692999676a19f047e3e082 # v1
66+
with:
67+
repo-token: ${{ secrets.GITHUB_TOKEN }}
68+
outcome: ${{ steps.build.outcome }}
69+
test-id: Cabal / smoke-test

contrib/cabal.project

Lines changed: 43 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- The Cabal build is unsupported. If this doesn’t work for you, we would welcome a PR, but also consider using the
2+
-- Stack (or Nix) build if possible.
3+
14
packages:
25
codebase2/codebase
36
codebase2/codebase-sqlite
@@ -6,13 +9,11 @@ packages:
69
codebase2/core
710
codebase2/util-serialization
811
codebase2/util-term
9-
1012
lib/orphans/network-uri-orphans-sqlite
1113
lib/orphans/unison-core-orphans-sqlite
1214
lib/orphans/unison-hash-orphans-aeson
1315
lib/orphans/unison-hash-orphans-sqlite
1416
lib/orphans/uuid-orphans-sqlite
15-
1617
lib/unison-hash
1718
lib/unison-hashing
1819
lib/unison-prelude
@@ -25,13 +26,14 @@ packages:
2526
lib/unison-util-recursion
2627
lib/unison-util-relation
2728
lib/unison-util-rope
28-
2929
parser-typechecker
30-
unison-core
3130
unison-cli
31+
unison-cli-integration
3232
unison-cli-main
33+
unison-core
3334
unison-hashing-v2
3435
unison-merge
36+
unison-runtime
3537
unison-share-api
3638
unison-share-projects-api
3739
unison-syntax
@@ -42,107 +44,43 @@ source-repository-package
4244
location: https://github.com/unisonweb/haskeline.git
4345
tag: 9275eea7982dabbf47be2ba078ced669ae7ef3d5
4446

45-
constraints:
46-
lsp == 2.3.0.0,
47-
fsnotify == 0.4.1.0,
48-
crypton-x509-store == 1.6.9,
49-
servant == 0.20.1,
50-
optparse-applicative == 0.18.1.0,
51-
tls == 1.8.0
52-
53-
-- For now there is no way to apply ghc-options for all local packages
54-
-- See https://cabal.readthedocs.io/en/latest/cabal-project.html#package-configuration-options
55-
package codebase
56-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
57-
58-
package codebase-sqlite
59-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
60-
61-
package codebase-sqlite-hashing-v2
62-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
63-
64-
package codebase-sync
65-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
66-
67-
package util-serializatio
68-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
69-
70-
package util-term
71-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
72-
73-
package network-uri-orphans-sqlite
74-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
75-
76-
package unison-core-orphans-sqlite
77-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
78-
79-
package unison-hash-orphans-aeson
80-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
81-
82-
package unison-hash-orphans-sqlite
83-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
84-
85-
package uuid-orphans-sqlite
86-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
87-
88-
package unison-hash
89-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
90-
91-
package unison-hashing
92-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
93-
94-
package unison-prelude
95-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
96-
97-
package unison-pretty-printer
98-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
99-
100-
package unison-sqlite
101-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
102-
103-
package unison-util-base32hex
104-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
105-
106-
package unison-util-bytes
107-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
108-
109-
package unison-util-cache
110-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
111-
112-
package unison-util-relation
113-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
114-
115-
package unison-util-rope
116-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
117-
118-
package parser-typechecker
119-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
120-
121-
package unison-cli
122-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
123-
124-
package unison-core
125-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
126-
127-
package unison-hashing-v2
128-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
129-
130-
package unison-merge
131-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
132-
133-
package unison-share-api
134-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
135-
136-
-- adding -Wno-deprecations cause jose-0.10 has deprecated Crypto.JWT.addClaim
137-
package unison-share-projects-api
138-
ghc-options: -Wall -Werror -Wno-deprecations -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
139-
140-
package unison-syntax
141-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
142-
143-
package easytest
144-
ghc-options: -Wall -Werror -Wno-name-shadowing -Wno-type-defaults -Wno-missing-pattern-synonym-signatures -fprint-expanded-synonyms -fwrite-ide-info
47+
source-repository-package
48+
type: git
49+
location: https://github.com/ChrisPenner/hs-mcp.git
50+
tag: d8564c70ca09e333b7ce1717d1ac97a62d62966c
14551

146-
-- This options are applied to all packages, local ones and also external dependencies.
52+
constraints:
53+
fuzzyfind ==3.0.2,
54+
lock-file ==0.7.0.0,
55+
monad-validat ==1.3.0.0,
56+
recover-rtti ==0.4.3,
57+
numerals ==0.4.1,
58+
network-udp ==0.0.0,
59+
hashtables ==1.4.2,
60+
61+
package haskeline
62+
flags: -terminfo
63+
64+
-- Use scoped wildcards to match the corresponding `allow-newer-deps` behavior from ../stack.yaml.
65+
allow-newer:
66+
numerals:*
67+
68+
program-options
69+
-- This should generally match the corresponding list in ../stack.yaml.
70+
ghc-options:
71+
-Wall
72+
-Werror
73+
-Wno-missing-pattern-synonym-signatures
74+
-Wno-name-shadowing
75+
-Wno-type-defaults
76+
-Wunused-packages
77+
-- Don’t error on deprecations, because the Cabal solver may select a newer version than is in Stackage, so we can’t
78+
-- necessarily remove uses of deprecated definitions.
79+
-Wwarn=deprecations
80+
-fprint-expanded-synonyms
81+
-funbox-strict-fields
82+
-fwrite-ide-info
83+
84+
-- These options are applied to all packages, local ones and also external dependencies.
14785
package *
14886
ghc-options: -haddock

0 commit comments

Comments
 (0)