packages feed

leaky 0.3.0.2 → 0.3.0.3

raw patch · 4 files changed

+178/−30 lines, 4 files

Files

changelog.txt view
@@ -1,4 +1,23 @@ +0.3.0.2 -> 0.3.0.3+ - figured out a few tricks+ - hopefully this upload is the ticket; sorry for the extra version uploads+ - cpphs is now again REQUIRED+----+ - almost out of ideas...+ - (determined to thwart the rogue build reporter)+ - a non-Simple build type might help+    - might help by simply getting ignored by this builder,+      for one thing -- but who else might it affect adversely?...+ - ghc-paths won't help since that info isn't accessible in+   the .cabal file anyway -- there's very little to help us there+   it seems+ - I'm trying to use env, but the trouble is, the -optP args+   are reordered by GHC+    - in particular, the -D options are always first, which+      ruins the hack since env chokes on those+ - if only we could write -pgmP"env PATH=$PATH:blah cpphs"!+ 0.3.0.1 -> 0.3.0.2  - once more... 
+ cpphs.sh view
@@ -0,0 +1,37 @@+#!/usr/bin/env bash++# (Hopefully that works on mingw32.)++## #!/bin/sh++# This is mostly to get rid of rogue failed build reports.+# Not my fault I have to make things ugly to fix mistakes of+# others (build reporters with misconfigured environemnts; and+# hackage, for allowing this to smear a perfectly good library+# by displaying the report so prominently, and making it+# impossible for the maintainer to get rid of it or even+# add an annotation).  I could have been doing something+# constructive with this time.++env PATH=$PATH:$HOME/.cabal/bin:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp $*++if [ 0 ]; then++if [ -f .cabal-sandbox/bin/cpphs ]; then+  # Building in a sandbox, you want the sandbox's cpphs:+  .cabal-sandbox/bin/cpphs --cpp $*+elif [ $(which cpphs) ]; then+  # Either cpphs was already on your path, or it was just installed and+  # is seen on your path -- use this one:+  cpphs --cpp $*+elif [ -f $HOME/.cabal/bin/cpphs ]; then+  $HOME/.cabal/bin/cpphs --cpp $*+elif [ $(which cpp) ]; then+  cpp $*+else+  echo 'ERROR: Neither cpphs nor cpp could be found!'+  exit 1+fi++fi+
leaky.cabal view
@@ -1,6 +1,6 @@  name:                leaky-version:             0.3.0.2+version:             0.3.0.3 synopsis:            Robust space leak, and its strictification license:             BSD3 license-file:        LICENSE@@ -62,6 +62,14 @@     , seqaid.config-full-incl-types --- , seqaid.config-full-no2ndmod +    -- Sorry! This is to smooth things over with rogue auto-build reports.+    -- It can be a useful trick to cope with path issues with GHC -pgm*.+    -- If this file doesn't remain executable when unpacked, we're done for.+    -- Possibly, build-type Configure could work, in which case probably+    -- a better solution?+    , cpphs.sh+    , seqaidpp.sh+     , leaky-min-cppd.hs     , leaky-min-cppd-working.hs     , leaky-min.hs@@ -157,16 +165,21 @@ -- This does indeed work for me (it is auto-toggled when cpphs is unavailable). -- Default to False, since it seems more likely there's a native cpp, than -- that a cpphs installation works smoothly.+-- Later: Defaulting to True, since found some tricks...+-- (Not even going to let this be manual:false anymore.) Flag USE_CPPHS-  Description: Non-manual flag to allow the build system to try cpphs first, and if that fails, then to try system-wide cpp (typically GNU). I've actually toggled the default, so the build system will try for a system-wide cpp first, and failing that, will try to use cpphs, installing it if necessary. I prefer cpp. I am not getting my most invaluable -Wundef option with cpphs using -optP-Wundef -optP--cpp in my ghc-options. Does cpphs implement it? Not sure...-  Default: False---Default: True-  Manual: False+  Description: Non-manual flag to allow the build system to try cpphs first, and if that fails, then to try system-wide cpp (typically GNU). I've actually toggled the default, so the build system will try for a system-wide cpp first, and failing that, will try to use cpphs, installing it if necessary. I prefer cpp. I am not getting my most invaluable -Wundef option with cpphs using -optP-Wundef -optP--cpp in my ghc-options. Does cpphs implement it? Not sure... / Back to default:true again...+--Default: False+  Default: True+--Manual: False+  Manual: True -Flag COWBOY-  Description: Non-manual flag to try to respond to rogue build failure reports from misconfigured auto-build systems.-  Default: False-  Manual: False+-- Either Cowboy doesn't auto-toggle non-manual flags, or the error happens+-- at too late a stage.+-- Flag COWBOY+--   Description: Non-manual flag to try to respond to rogue build failure reports from misconfigured auto-build systems.+--   Default: False+--   Manual: False  executable leaky @@ -178,11 +191,15 @@       Types_no_SOP     , Types_explicit_SOP -  build-tools: cpphs  -  -- (This seems /not/ to work, seeing as USE_CPPHS is default:false,-  -- and cpphs is still mentioned in the hackage deps.)---if flag(USE_CPPHS)---   build-tools: cpphs+-- I feel like declaring this is only asking for more trouble;+-- cpphs installs because it's mentioned as a dependency, and+-- that does install both the library and the executable.+---------+--   build-tools: cpphs  +--   -- (This seems /not/ to work, since, when USE_CPPHS is default:false,+--   -- cpphs is still mentioned in the hackage deps.)+-- --if flag(USE_CPPHS)+-- --   build-tools: cpphs    build-depends:       base == 4.*@@ -194,9 +211,6 @@   if flag(USE_CPPHS)      build-depends:          cpphs > 1.14-  if flag(COWBOY)-     build-depends:-         cpphs > 1.14  ---------- BEGIN SEQAID-SPECIFIC -- PART 1 of 2 ---------- @@ -231,36 +245,88 @@    ---------- END SEQAID-SPECIFIC -- PART 1 of 2 ---------- -  -- hs-source-dirs:         default-language:    Haskell2010++  default-extensions:  CPP+   ghc-options: -optP-Wundef -fno-warn-overlapping-patterns --ghc-options: -optP-Wundef -fno-warn-overlapping-patterns -rtsopts -threaded+   if flag(PROFILE)     ghc-options: -fprof-auto -auto-all -caf-all +-- You know what? Fuck it. fuckitfuckitfuckit+-- Use a shell script delegator for this too.+  -- !! This, in conjunction with the -pgmPenv -optP--cpp, WORKS.+  -- (Can't we put the --cpp option on this one instead?)+  -- Unfortunately, there seems to be no comparable trick for -pgmF.+  -- (See comments below at -pgmF.)+  -- -ags+ 20150202+--cpp-options: PATH=$PATH:.cabal-sandbox/bin:$HOME/.cabal/bin:/home/builder/hackage-server/build-cache/tmp-install/bin:$HOME/_T03 cpphs+--cpp-options: PATH=$PATH:.cabal-sandbox/bin:~/_T03:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp+--cpp-options: PATH=$PATH:.cabal-sandbox/bin:$HOME/_T03:/home/andru/_T03:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp+--cpp-options: PATH=.cabal-sandbox/bin:$HOME/_T03:/home/andru/_T03:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp+--cpp-options: PATH=.cabal-sandbox/bin:/home/andru/_T03:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp+--cpp-options: PATH=$PATH:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp+--cpp-options: PATH=$PATH:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs+--cpp-options: PATH=$PATH:.cabal-sandbox/bin:$HOME/.cabal/bin:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs+--cpp-options: PATH=$PATH:~/.cabal/bin:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs+--cpp-options: PATH=$PATH:~/.cabal/bin:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp+   if flag(USE_CPPHS)-     ghc-options: -pgmPcpphs -optP--cpp---else---   ghc-options: -cpp-  if flag(COWBOY)-     ghc-options: -pgmP/home/builder/hackage-server/build-cache/tmp-install/bin/cpphs -optP--cpp+     -- -ags+ 20150202+     ghc-options: -pgmP./cpphs.sh+--   ghc-options: -pgmPenv+--   ghc-options: -pgmPenv -optP--cpp+-- target ‘PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin\’ is not a module name or a source file+--   ghc-options: -pgmPenv\ PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin\ cpphs -optP--cpp+-- target ‘PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin\\’ is not a module name or a source file+--   ghc-options: -pgmPenv\\ PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin\\ cpphs -optP--cpp+-- target ‘PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin’ is not a module name or a source file+--   ghc-options: -pgmP"env PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs" -optP--cpp+--   ghc-options: -pgmPenv -optPPATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin -optPcpphs -optP--cpp+--   ghc-options: -pgmPenv -optP"PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin" -optPcpphs -optP--cpp+--   ghc-options: -pgmPenv -optP" PATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin cpphs --cpp"+--   ghc-options: -pgmPcpphs -optP--cpp +---else+---   ghc-options: -cpp+ ---------- BEGIN SEQAID-SPECIFIC -- PART 2 of 2 ----------    if flag(TURN_ON_SEQAID_PLUGIN)      ghc-options: -fplugin=Seqaid.Plugin -    if flag(COWBOY)-        ghc-options: -F -pgmF /home/builder/hackage-server/build-cache/tmp-install/bin/seqaidpp+    -- Unfortunately, there seems to be no trick comparable to my -pgmP+    -- hack above, not for -pgmF. :(  The trouble is, the name of the file+    -- being processed is always the first argument (see cabal build -v3),+    -- which ruins the hack.  Will continue to look for a workaround.+    --+    -- Specifically, quoting the GHC 7.8.4 docs:+    -- "Use -pgmF cmd to select the program to use as the preprocessor. When invoked, the cmd pre-processor is given at least three arguments on its command-line: the first argument is the name of the original source file, the second is the name of the file holding the input, and the third is the name of the file where cmd should write its output to."+    -- "Additional arguments to the pre-processor can be passed in using the -optF option. These are fed to cmd on the command line after the three standard input and output arguments."+    --+    -- I wonder if I put a file.sh script in the top-level dir of+    -- my source distribution, if I could call that without worrying+    -- about local paths?  Then it could delegate to env, with the+    -- arguments reordered as needed...+    --+    -- AND IT WORKED!!!  I checked, and the seqaidpp.sh script MUST+    -- have user execute permissions, which may be a problem (will+    -- have to see).+    --+    -- It's just possible xargs could be used instead, and give us+    -- argument reordering...+    if flag(USING_SANDBOX)+      ghc-options: -F -pgmF.cabal-sandbox/bin/seqaidpp     else-      if flag(USING_SANDBOX)-        ghc-options: -F -pgmF .cabal-sandbox/bin/seqaidpp-      else-        ghc-options: -F -pgmF seqaidpp+      ghc-options: -F -pgmF./seqaidpp.sh+--    ghc-options: -F -pgmFenv -optFPATH=$PATH:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin -optFseqaidpp+--    ghc-options: -F -pgmFseqaidpp      if flag(OMNITYPIC)-      ghc-options: -optF omnitypic+      ghc-options: -optFomnitypic  --  ghc-options: -XTemplateHaskell     default-extensions:    TemplateHaskell@@ -349,6 +415,15 @@  --ghc-options: -ddump-simpl --ghc-options: -ddump-splices++------------------------------------------------------++---- Trying to get the -D options to come AFTER these ones...+---- Sadly this did not seem to affect the GHC (re)ordering of -optP's+---- and other cpp-options.+---- SAY... cpp-options, right... wow...+--if flag(USE_CPPHS)+--   ghc-options: -pgmPenv -optPPATH=$PATH:/home/builder/hackage-server/build-cache/tmp-install/bin -optPcpphs -optP--cpp  ------------------------------------------------------ 
+ seqaidpp.sh view
@@ -0,0 +1,17 @@+#!/usr/bin/env bash++# (Hopefully that works on mingw32.)++## #!/bin/sh++# This is mostly to get rid of rogue failed build reports.+# Not my fault I have to make things ugly to fix mistakes of+# others (build reporters with misconfigured environemnts; and+# hackage, for allowing this to smear a perfectly good library+# by displaying the report so prominently, and making it+# impossible for the maintainer to get rid of it or even+# add an annotation).  I could have been doing something+# constructive with this time.++env PATH=$PATH:$HOME/.cabal/bin:.cabal-sandbox/bin:/home/builder/hackage-server/build-cache/tmp-install/bin seqaidpp $*+