packages feed

ngx-export-distribution 0.5.4.1 → 0.5.4.2

raw patch · 4 files changed

+47/−16 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Changelog.md view
@@ -1,3 +1,10 @@+### 0.5.4.2++- *nhm-tool*: use cradle *bios* in generated *hie.yaml*. The bios shell script+  returns an error message with advice to run *make env* if GHC environment+  file (technically, a symbolic link to this file) is missing. It also loads+  extra source files automatically if they follow the GHC naming convention.+ ### 0.5.4.1  - *nhm-tool*: add a new target *make config* in generated *Makefile*: this
NgxExport/Distribution.hs view
@@ -312,15 +312,15 @@ -- -- > $ make env ----- This is enough to start editing the Haskell source file in an editor which--- has support for the /Haskell Language Server/.+-- This is enough to start editing the Haskell source file in an editor with+-- support for the /Haskell Language Server/. ----- If you want to add more Haskell source files, add their names into variable--- /SRC/ in /Makefile/. If the root Haskell source file depends on modules from--- other source files, add their names (or module names) into the list of--- arguments in file /hie.yaml/. This is required for the Haskell Language--- Server to work correctly. Note also that in this case the names of the files--- must be equal to the names of the modules these files provide.+-- If you want to add more Haskell source files, follow the naming convention+-- described in the /GHC User's Guide/ in section+-- [The search path](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/separate_compilation.html#search-path).+-- In this case, no changes in /hie.yaml/ are required. But it makes sense to+-- add the new source files into variable /SRC/ in /Makefile/ to let /make/+-- track them too.  -- $drawbacks --
ngx-export-distribution.cabal view
@@ -1,5 +1,5 @@ name:                       ngx-export-distribution-version:                    0.5.4.1+version:                    0.5.4.2 synopsis:                   Build custom libraries for Nginx Haskell module description:                Build custom libraries for         <https://github.com/lyokha/nginx-haskell-module Nginx Haskell module>.
nhm-tool.hs view
@@ -521,6 +521,7 @@      \CABAL := cabal\n\      \GHCVER := $(shell $(GHC) --numeric-version)\n\      \GHCENV := .ghc.environment.$(MACHINE)-$(KERNEL)-$(GHCVER)\n\+     \GHCENVLNK := ", ghcEnvLnk, "\n\      \DEPLIBS := $(MACHINE)-$(KERNEL)-ghc-$(GHCVER)\n\      \BUILDDIR := dist-nhm\n\      \SETUPCONFIG := $(BUILDDIR)/setup-config\n\@@ -529,19 +530,21 @@      \\n\      \all: $(DISTR)\n\      \\n\-     \env: $(GHCENV)\n\+     \env: $(GHCENVLNK)\n\      \\n\      \config: $(SETUPCONFIG)\n\      \\n\-     \$(GHCENV): cabal.project $(PKGNAME).cabal\n\+     \$(GHCENVLNK): cabal.project $(PKGNAME).cabal\n\+     \\trm -f $(GHCENVLNK)\n\      \\t$(CABAL) install --builddir=\"$(BUILDDIR)\" --lib --only-dependencies \      \\\\n\      \\t  --package-env .\n\      \\tsed -i 's/\\(^package-id \\)/--\\1/' $(GHCENV)\n",      updatePath,      "\t$(NHMTOOL) deps $(PKGNAME) -d \"$(BUILDDIR)\" >> $(GHCENV)\n\+     \\tln -sf $(GHCENV) $(GHCENVLNK)\n\      \\n\-     \$(SETUPCONFIG): $(GHCENV)\n",+     \$(SETUPCONFIG): $(GHCENVLNK)\n",      updatePath,      "\trunhaskell --ghc-arg=-package=base \\\n\      \\t  --ghc-arg=-package=$(PKGDISTR) Setup.hs configure \\\n\@@ -572,7 +575,7 @@      \\n\      \clean-all: clean\n\      \\trm -rf $(BUILDDIR)\n\-     \\trm -f $(GHCENV) $(DISTR)\n"+     \\trm -f $(GHCENV) $(GHCENVLNK) $(DISTR)\n"     ]     where updatePath =               "\tif test \"$(NHMTOOL)\" = nhm-tool && ! command -v nhm-tool \@@ -596,8 +599,29 @@ hieYaml :: InitData -> Text hieYaml InitData {..} = T.concat     ["cradle:\n\-     \  direct:\n\-     \    arguments: ["-    ,T.pack $ intercalate ", " $ map show initDataGhcOptions, "]\n"+     \  bios:\n\+     \    shell: |\n\+     \      if [ -L ", ghcEnvLnk, " ]\n\+     \      then\n\+     \          echo -e \""+    ,T.replace "-" "\\x2d" $ T.pack $ intercalate "\\n" initDataGhcOptions+    ,"\" > $HIE_BIOS_OUTPUT\n\+     \          for file in $(find * -name '[A-Z]*.hs')\n\+     \          do\n\+     \              if grep -q \"^\\s*module $(echo $file |\n\+     \                  sed 's/^\\(.*\\)\\..*/\\1/;s/\\//./g')\" $file\n\+     \              then\n\+     \                  echo $file >> $HIE_BIOS_OUTPUT\n\+     \              fi\n\+     \          done\n\+     \      else\n\+     \          echo -n \"Ghc environment file wasn't found, \"`\n\+     \                 `\"run \\\"make env\\\" and restart \+     \language server.\" >&2\n\+     \          exit 1\n\+     \      fi\n"     ]++ghcEnvLnk :: Text+ghcEnvLnk = ".ghc.environment.lnk"