Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
4d10aa95
Commit
4d10aa95
authored
Jul 10, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hopefully-deterministic cabal.project and installation-avoidance of stack2cabal
parent
4f4945a0
Pipeline
#4358
passed with stage
in 24 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2345 additions
and
219 deletions
+2345
-219
update-cabal-project
bin/update-cabal-project
+22
-3
cabal.project
cabal.project
+1
-1
cabal.project.freeze
cabal.project.freeze
+2322
-215
No files found.
bin/update-cabal-project
View file @
4d10aa95
...
...
@@ -5,6 +5,25 @@ set -euxo pipefail
DEFAULT_STORE
=
$HOME
/.cabal
STORE_DIR
=
"
${
1
:-
$DEFAULT_STORE
}
"
cabal
--store-dir
=
$STORE_DIR
v2-update
'hackage.haskell.org,2023-06-25T00:00:00Z'
cabal
--store-dir
=
$STORE_DIR
v2-install stack2cabal-1.0.14
--overwrite-policy
=
always
stack2cabal
--no-run-hpack
-p
'2023-06-25'
# README!
# Every time you modify the `stack.yaml` and as result the relevant `cabal.project`
# changes, you have to make sure to update the `expected_cabal_projet_hash` with the
# `sha256sum` result calculated on the `cabal.project`. This ensures the `cabal.project`
# stays deterministic so that CI cache can kick in.
expected_cabal_project_hash
=
"41b2a260acaa6252541612a43ef42789ce61cc544a11249a98fa148c7ffe0cb8"
cabal
--store-dir
=
$STORE_DIR
v2-update
'hackage.haskell.org,2023-06-24T21:28:46Z'
# Install stack2cabal if it can't be found.
if
!
stack2cabal
--help
&> /dev/null
then
echo
"<the_command> could not be found"
cabal
--store-dir
=
$STORE_DIR
v2-install
--index-state
=
"2023-06-24T21:28:46Z"
stack2cabal-1.0.14
--overwrite-policy
=
always
fi
stack2cabal
--no-run-hpack
-p
'2023-06-24 21:28:46'
actual_cabal_project_hash
=
$(
sha256sum
cabal.project |
awk
'{printf "%s",$1}'
)
if
[[
$actual_cabal_project_hash
!=
$expected_cabal_project_hash
]]
;
then
echo
"ERROR! hash mismatch between expected cabal.project and the one computed by stack2cabal."
exit
1
fi
cabal.project
View file @
4d10aa95
--
Generated
by
stack2cabal
index
-
state
:
2023
-
06
-
2
5
T00
:
00
:
00
Z
index
-
state
:
2023
-
06
-
2
4
T21
:
28
:
46
Z
with
-
compiler
:
ghc
-
8.10.7
...
...
cabal.project.freeze
View file @
4d10aa95
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment