@@ -27,17 +27,20 @@ version for packages. It is fine if dependencies disappear.
2727... running cabal-plan-diff.sh ...
2828"
2929
30+
3031if [[ -d " ./tmp" ]]; then
3132 rm -r tmp
3233fi
3334mkdir tmp
34- trap rm -r ./tmp EXIT
35+ trap ' rm -r ./tmp' EXIT
3536
3637cabal update & > /dev/null
3738
3839cabal build all --dry-run --minimize-conflict-set
3940cp ./dist-newstyle/cache/plan.json ./tmp/plan-full.json
4041
42+ GHC_BIN=$( readlink $( which ghc) | rev | cut -d' /' -f1 | rev)
43+
4144touch ./tmp/cabal.project
4245echo -e "
4346repository cardano-haskell-packages
@@ -55,7 +58,7 @@ index-state:
5558 , hackage.haskell.org HEAD
5659 , cardano-haskell-packages HEAD
5760
58- with-compiler: ghc-9.2.8
61+ with-compiler: $GHC_BIN
5962
6063tests: False
6164benchmarks: False
8689
8790 awk ' /^$/{f=!f} f' ./tmp/the-diff-1 > ./tmp/the-diff
8891
89- grep " ^\-" ./tmp/the-diff | cut -d' -' -f2- | cut -d' ' -f1 > ./tmp/only-in-full
90- grep " ^\+" ./tmp/the-diff | cut -d' +' -f2- | cut -d' ' -f1 > ./tmp/only-in-libs
92+ grep " ^\-" ./tmp/the-diff | cut -d' -' -f2- | cut -d' ' -f1 | sort -u > ./tmp/only-in-full
93+ grep " ^\+" ./tmp/the-diff | cut -d' +' -f2- | cut -d' ' -f1 | sort -u > ./tmp/only-in-libs
9194
9295 echo -e " \n=== TEST ONLY DEPENDENCIES"
9396
94- comm -2 -3 <( rev ./tmp/only-in-full | cut -d' -' -f2- | rev | uniq ) <( rev ./tmp/only-in-libs | cut -d' -' -f2- | rev | uniq )
97+ comm -2 -3 <( rev ./tmp/only-in-full | cut -d' -' -f2- | rev | sort -u ) <( rev ./tmp/only-in-libs | cut -d' -' -f2- | rev | sort -u )
9598
9699 echo -e " \n=== FULL-BUILD ONLY DEPENDENCIES"
97100
98- comm -1 -3 <( rev ./tmp/only-in-full | cut -d' -' -f2- | rev | uniq ) <( rev ./tmp/only-in-libs | cut -d' -' -f2- | rev | uniq )
101+ comm -1 -3 <( rev ./tmp/only-in-full | cut -d' -' -f2- | rev | sort -u ) <( rev ./tmp/only-in-libs | cut -d' -' -f2- | rev | sort -u )
99102
100103 echo -e " \n=== VERSION BUMPS FROM TESTS ONLY TO FULL-BUILD"
101104
102- common=$( comm -1 -2 <( rev ./tmp/only-in-full | cut -d' -' -f2- | rev | uniq ) <( rev ./tmp/only-in-libs | cut -d' -' -f2- | rev | uniq ) )
105+ common=$( comm -1 -2 <( rev ./tmp/only-in-full | cut -d' -' -f2- | rev | sort -u ) <( rev ./tmp/only-in-libs | cut -d' -' -f2- | rev | sort -u ) )
103106
104107 major=()
105108 minor=()
0 commit comments