diff --git a/.gitignore b/.gitignore index d253c2b..166bd3e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ /cabal.sandbox.config /.cabal-sandbox/ /build/ -/.stack-work/ \ No newline at end of file +/.stack-work/ +/.ghc.environment.* +/dist-newstyle/ diff --git a/Makefile b/Makefile index 3309cde..8e3260f 100644 --- a/Makefile +++ b/Makefile @@ -4,20 +4,13 @@ # there is no real reason to actually use the makefile except for a # 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 build : - cabal v1-build + cabal v2-build --enable-tests .PHONY : test -test : build - dist/build/Tests/Tests --hide-successes +test : + cabal v2-test .PHONY : website website : @@ -25,7 +18,9 @@ website : .PHONY : clean clean : - cabal v1-clean - cabal v1-sandbox delete + cabal v2-clean rm -Rf build/ +.PHONY: parserexe +parserexe : + cabal v2-build -fparserexe SimpleSqlParserTool diff --git a/TODO b/TODO index fda14b3..69d3504 100644 --- a/TODO +++ b/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 syntax from hssqlppp: diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..2ea013d --- /dev/null +++ b/shell.nix @@ -0,0 +1,12 @@ +with import {}; +stdenv.mkDerivation rec { + name = "env"; + env = buildEnv { name = name; paths = buildInputs; }; + buildInputs = [ + ghc + cabal-install + glibcLocales + ]; + shellHook = "export LANG=en_GB.UTF-8"; +} + diff --git a/simple-sql-parser.cabal b/simple-sql-parser.cabal index aadf118..b223176 100644 --- a/simple-sql-parser.cabal +++ b/simple-sql-parser.cabal @@ -103,6 +103,14 @@ executable SimpleSqlParserTool other-extensions: TupleSections,DeriveDataTypeable default-language: Haskell2010 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) buildable: True else @@ -126,3 +134,4 @@ executable Fixity buildable: True else buildable: False + diff --git a/stack.yaml b/stack.yaml index 1b59034..ffb9276 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,8 +1,7 @@ # 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) -resolver: lts-9.0 -#resolver: nightly-2017-07-31 +resolver: lts-13.27 # Local packages, usually specified by relative directory name packages: diff --git a/website/make_website.sh b/website/make_website.sh index b960250..d7c3556 100755 --- a/website/make_website.sh +++ b/website/make_website.sh @@ -1,6 +1,6 @@ #! /bin/sh -set -e +set -ex # todo: check this is run from the project root and not the website/ # dir @@ -11,20 +11,15 @@ cp website/ocean.css build # index 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 - -#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 # pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html # 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 - | \ sed -e "s/max-width:62\.5em//g" \ > build/test_cases.html @@ -35,7 +30,7 @@ asciidoctor build/test_cases.asciidoc -o - | \ rm build/test_cases.asciidoc # haddock -cabal haddock +cabal v2-haddock rm -Rf build/haddock mkdir build/haddock/ cp -R dist/doc/html/simple-sql-parser/* build/haddock/