Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix c2hs handling in Cabal #6233

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fbef0e3
Add sorting mechanism for chs files
vmchale Sep 11, 2019
c3e9b87
Fix nested parser bug + remove dead code
vmchale Sep 11, 2019
e74115e
Style improvements + slimming
vmchale Sep 11, 2019
cca903b
Reorder c2hs files in a library
vmchale Sep 11, 2019
2290218
Prettify
vmchale Sep 11, 2019
625423e
Update ChangeLog
vmchale Sep 11, 2019
71b6d32
Compatibility with older GHCs
vmchale Sep 11, 2019
16b00a2
Disbale warning since we're using a wrapper/template
vmchale Sep 11, 2019
8358fdf
Use Cabal prelude
vmchale Sep 11, 2019
6338732
Fix build for older GHCs
vmchale Sep 11, 2019
c018b57
Check Cabal/Distribution/C2Hs/Lexer.hs into version control for sake …
vmchale Sep 11, 2019
f721560
Use bootstraph script for Alex
vmchale Sep 11, 2019
64c7d1a
Use Makefile for lexer
vmchale Sep 11, 2019
6281535
Use makefile approach
vmchale Sep 11, 2019
bc1ed2c
Modify makefile
vmchale Sep 11, 2019
0dc1c71
Try to reduce time on Mac
vmchale Sep 11, 2019
a4a2448
Travis don't install happy
vmchale Sep 11, 2019
f71b5af
Pass verbosity appropriately + use cabal's graph/sort capabilities
vmchale Sep 13, 2019
a8c95ae
Add comments to functions
vmchale Sep 13, 2019
5f2814f
Clean up + consistent indentation
vmchale Sep 13, 2019
746ae57
Polish up lexer module w.r.t. documentation
vmchale Sep 13, 2019
2154c2c
Use revTopSort instead of reverse . topSort
vmchale Sep 13, 2019
eb3d592
Merge branch 'master' of github.com:vmchale/cabal
vmchale Sep 13, 2019
b616f0e
Polish/rewrite Distribution.C2Hs
vmchale Sep 13, 2019
243e6b8
Add a few unit tests
vmchale Sep 13, 2019
e9cb223
Add tests of c2hs import lexer
vmchale Sep 13, 2019
7b2c729
Add tests of reorderC2Hs + example source files
vmchale Sep 13, 2019
0d0ec9e
Fix documentation + escape correctly
vmchale Sep 13, 2019
0812063
Don't bother supporting .chs main file
vmchale Sep 14, 2019
34f3ff0
Don't use $> to preserve GHC 7.6.3 compatibility
vmchale Sep 14, 2019
280e647
Merge branch 'master' of github.com:haskell/cabal
vmchale Sep 16, 2019
f4c354a
Merge branch 'master' of github.com:haskell/cabal
vmchale Sep 24, 2019
d6f6feb
Merge branch 'master' of github.com:haskell/cabal
vmchale Sep 25, 2019
6b461de
Fix block comments
vmchale Sep 28, 2019
6ae37b0
Add unit tests for block comments
vmchale Sep 28, 2019
fe760c5
Move test modules
vmchale Sep 28, 2019
6031b43
Expand module-level comment
vmchale Sep 28, 2019
ca7537b
Add a module-level comment to Cabal.Distribution.C2Hs
vmchale Sep 28, 2019
5bc4c03
Merge branch 'master' of github.com:haskell/cabal
vmchale Oct 13, 2019
0bba20f
merge
vmchale Nov 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cabal-install/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ DIGEST_VER="0.0.1.2"; DIGEST_REGEXP="0\.0\.(1\.[2-9]|[2-9]\.?)"
# >= 0.0.1.2 && < 0.1
ZIP_ARCHIVE_VER="0.3.3"; ZIP_ARCHIVE_REGEXP="0\.3\.[3-9]"
# >= 0.3.3 && < 0.4
ALEX_VER="3.2.4"; ALEX_REGEXP="3\.2\.[0-9]"
# >= 3.2.0 && < 3.3

HACKAGE_URL="https://hackage.haskell.org/package"

Expand Down Expand Up @@ -430,8 +432,9 @@ do_Cabal_pkg () {
then
if need_pkg "Cabal" ${CABAL_VER_REGEXP}
then
ALEX_PATH="$(pwd)/$(find . -name alex -perm 755 | tail -n1)"
echo "Cabal-${CABAL_VER} will be installed from the local Git clone."
(cd ../Cabal && install_pkg ${CABAL_VER} ${CABAL_VER_REGEXP})
(cd ../Cabal && ${ALEX_PATH} -g Distribution/C2Hs/Lexer.x && install_pkg ${CABAL_VER} ${CABAL_VER_REGEXP})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the fence with these. The lexer for .cabal files is generated in manual preprocessing step (see Makefile). And rather keep it that way, i.e. let's not have compile-time dependency on alex.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

else
echo "Cabal is already installed and the version is ok."
fi
Expand All @@ -450,6 +453,7 @@ info_pkg "transformers" ${TRANS_VER} ${TRANS_VER_REGEXP}
info_pkg "mtl" ${MTL_VER} ${MTL_VER_REGEXP}
info_pkg "text" ${TEXT_VER} ${TEXT_VER_REGEXP}
info_pkg "parsec" ${PARSEC_VER} ${PARSEC_VER_REGEXP}
info_pkg "alex" ${ALEX_VER} ${ALEX_VER_REGEXP}
info_pkg "network-uri" ${NETWORK_URI_VER} ${NETWORK_URI_VER_REGEXP}
info_pkg "network" ${NETWORK_VER} ${NETWORK_VER_REGEXP}
info_pkg "HTTP" ${HTTP_VER} ${HTTP_VER_REGEXP}
Expand Down Expand Up @@ -484,6 +488,7 @@ do_pkg "transformers" ${TRANS_VER} ${TRANS_VER_REGEXP}
do_pkg "mtl" ${MTL_VER} ${MTL_VER_REGEXP}
do_pkg "text" ${TEXT_VER} ${TEXT_VER_REGEXP}
do_pkg "parsec" ${PARSEC_VER} ${PARSEC_VER_REGEXP}
do_pkg "alex" ${ALEX_VER} ${ALEX_VER_REGEXP}

# Install the Cabal library from the local Git clone if possible.
do_Cabal_pkg
Expand Down