update build to use new cabal, update stack resolver, add build target for exe
This commit is contained in:
parent
908a8156e2
commit
8555650583
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -3,4 +3,6 @@
|
||||||
/cabal.sandbox.config
|
/cabal.sandbox.config
|
||||||
/.cabal-sandbox/
|
/.cabal-sandbox/
|
||||||
/build/
|
/build/
|
||||||
/.stack-work/
|
/.stack-work/
|
||||||
|
/.ghc.environment.*
|
||||||
|
/dist-newstyle/
|
||||||
|
|
19
Makefile
19
Makefile
|
@ -4,20 +4,13 @@
|
||||||
# there is no real reason to actually use the makefile except for a
|
# there is no real reason to actually use the makefile except for a
|
||||||
# very small amount of convenience
|
# very small amount of convenience
|
||||||
|
|
||||||
.PHONY : init
|
|
||||||
init :
|
|
||||||
cabal v1-sandbox init
|
|
||||||
cabal v1-install happy
|
|
||||||
cabal v1-install --only-dependencies --enable-tests
|
|
||||||
cabal v1-configure --enable-tests
|
|
||||||
|
|
||||||
.PHONY : build
|
.PHONY : build
|
||||||
build :
|
build :
|
||||||
cabal v1-build
|
cabal v2-build --enable-tests
|
||||||
|
|
||||||
.PHONY : test
|
.PHONY : test
|
||||||
test : build
|
test :
|
||||||
dist/build/Tests/Tests --hide-successes
|
cabal v2-test
|
||||||
|
|
||||||
.PHONY : website
|
.PHONY : website
|
||||||
website :
|
website :
|
||||||
|
@ -25,7 +18,9 @@ website :
|
||||||
|
|
||||||
.PHONY : clean
|
.PHONY : clean
|
||||||
clean :
|
clean :
|
||||||
cabal v1-clean
|
cabal v2-clean
|
||||||
cabal v1-sandbox delete
|
|
||||||
rm -Rf build/
|
rm -Rf build/
|
||||||
|
|
||||||
|
.PHONY: parserexe
|
||||||
|
parserexe :
|
||||||
|
cabal v2-build -fparserexe SimpleSqlParserTool
|
||||||
|
|
21
TODO
21
TODO
|
@ -1,3 +1,24 @@
|
||||||
|
task right now: get a 0.5.0 release
|
||||||
|
check generated documentation
|
||||||
|
fix docs on index of website for cabal v2
|
||||||
|
add notes on non query supported sql
|
||||||
|
add note about the release being not a milestone but just checkpoint
|
||||||
|
test with different ghcs
|
||||||
|
maybe add something to the docs about bug reports and feature requests
|
||||||
|
fix these two bugs
|
||||||
|
https://github.com/JakeWheat/simple-sql-parser/issues/7
|
||||||
|
https://github.com/JakeWheat/simple-sql-parser/issues/8
|
||||||
|
work on this one?
|
||||||
|
https://github.com/JakeWheat/simple-sql-parser/pull/19
|
||||||
|
is this one fixed now?
|
||||||
|
https://github.com/JakeWheat/simple-sql-parser/issues/15
|
||||||
|
review alters, and think about adding rename versions
|
||||||
|
https://github.com/JakeWheat/simple-sql-parser/issues/20
|
||||||
|
update changelog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
medium tasks next release
|
medium tasks next release
|
||||||
|
|
||||||
syntax from hssqlppp:
|
syntax from hssqlppp:
|
||||||
|
|
12
shell.nix
Normal file
12
shell.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "env";
|
||||||
|
env = buildEnv { name = name; paths = buildInputs; };
|
||||||
|
buildInputs = [
|
||||||
|
ghc
|
||||||
|
cabal-install
|
||||||
|
glibcLocales
|
||||||
|
];
|
||||||
|
shellHook = "export LANG=en_GB.UTF-8";
|
||||||
|
}
|
||||||
|
|
|
@ -103,6 +103,14 @@ executable SimpleSqlParserTool
|
||||||
other-extensions: TupleSections,DeriveDataTypeable
|
other-extensions: TupleSections,DeriveDataTypeable
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
Other-Modules: Language.SQL.SimpleSQL.Combinators
|
||||||
|
Language.SQL.SimpleSQL.Dialect
|
||||||
|
Language.SQL.SimpleSQL.Errors
|
||||||
|
Language.SQL.SimpleSQL.Lex
|
||||||
|
Language.SQL.SimpleSQL.Parse
|
||||||
|
Language.SQL.SimpleSQL.Pretty
|
||||||
|
Language.SQL.SimpleSQL.Syntax
|
||||||
|
|
||||||
if flag(parserexe)
|
if flag(parserexe)
|
||||||
buildable: True
|
buildable: True
|
||||||
else
|
else
|
||||||
|
@ -126,3 +134,4 @@ executable Fixity
|
||||||
buildable: True
|
buildable: True
|
||||||
else
|
else
|
||||||
buildable: False
|
buildable: False
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html
|
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html
|
||||||
|
|
||||||
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
|
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
|
||||||
resolver: lts-9.0
|
resolver: lts-13.27
|
||||||
#resolver: nightly-2017-07-31
|
|
||||||
|
|
||||||
# Local packages, usually specified by relative directory name
|
# Local packages, usually specified by relative directory name
|
||||||
packages:
|
packages:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
# todo: check this is run from the project root and not the website/
|
# todo: check this is run from the project root and not the website/
|
||||||
# dir
|
# dir
|
||||||
|
@ -11,20 +11,15 @@ cp website/ocean.css build
|
||||||
|
|
||||||
# index
|
# index
|
||||||
asciidoctor website/index.asciidoc -o - | runhaskell website/AddLinks.lhs > build/index.html
|
asciidoctor website/index.asciidoc -o - | runhaskell website/AddLinks.lhs > build/index.html
|
||||||
#pandoc --from=markdown --to=html website/index.txt -o build/index.html -c main.css --title=simple-sql-parser --toc
|
|
||||||
asciidoctor website/supported_sql.asciidoc -o - | runhaskell website/AddLinks.lhs > build/supported_sql.html
|
asciidoctor website/supported_sql.asciidoc -o - | runhaskell website/AddLinks.lhs > build/supported_sql.html
|
||||||
|
|
||||||
|
|
||||||
#pandoc --from=markdown --to=html website/supported_sql.txt -o build/supported_sql.html -c main.css '--title=simple-sql-parser supported SQL' --toc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# tpch sql file
|
# tpch sql file
|
||||||
# pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html
|
# pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html
|
||||||
# rendered test cases
|
# rendered test cases
|
||||||
runhaskell -package-db=.cabal-sandbox/x86_64-linux-ghc-8.6.5-packages.conf.d -i:tools website/RenderTestCases.lhs > build/test_cases.asciidoc
|
# build the parserexe target first to fix the package database
|
||||||
|
runhaskell -itools website/RenderTestCases.lhs > build/test_cases.asciidoc
|
||||||
|
|
||||||
#pandoc --from=markdown --to=html build/test_cases.asciidoc -o build/test_cases.html -c main.css '--title=simple-sql-parser examples/test cases' --toc
|
|
||||||
asciidoctor build/test_cases.asciidoc -o - | \
|
asciidoctor build/test_cases.asciidoc -o - | \
|
||||||
sed -e "s/max-width:62\.5em//g" \
|
sed -e "s/max-width:62\.5em//g" \
|
||||||
> build/test_cases.html
|
> build/test_cases.html
|
||||||
|
@ -35,7 +30,7 @@ asciidoctor build/test_cases.asciidoc -o - | \
|
||||||
|
|
||||||
rm build/test_cases.asciidoc
|
rm build/test_cases.asciidoc
|
||||||
# haddock
|
# haddock
|
||||||
cabal haddock
|
cabal v2-haddock
|
||||||
rm -Rf build/haddock
|
rm -Rf build/haddock
|
||||||
mkdir build/haddock/
|
mkdir build/haddock/
|
||||||
cp -R dist/doc/html/simple-sql-parser/* build/haddock/
|
cp -R dist/doc/html/simple-sql-parser/* build/haddock/
|
||||||
|
|
Loading…
Reference in a new issue