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

Failures from EnvironmentSpec.hs tests #6

Open
khalid-hussain opened this issue Jul 19, 2020 · 26 comments
Open

Failures from EnvironmentSpec.hs tests #6

khalid-hussain opened this issue Jul 19, 2020 · 26 comments

Comments

@khalid-hussain
Copy link

khalid-hussain commented Jul 19, 2020

Greetings.

I'm using Pandoc v 2.10 on Windows 10. Running stack test gave me the following errors:

Failures:

  test\EnvironmentSpec.hs:36:9:
  1) Environment.environment reads environment variables
       expected: Pandoc (Meta {unMeta = fromList []}) [Para [Str "C:",RawInline (Format "tex") "\\Users",RawInline (Format "tex") "\\Khalid"]]
        but got: Pandoc (Meta {unMeta = fromList []}) [Para [Str "C:\\Users\\Khalid"]]

  To rerun use: --match "/Environment/environment/reads environment variables/"

  test\EnvironmentSpec.hs:40:9:
  2) Environment.environment reads the abp binary path
       expected: Pandoc (Meta {unMeta = fromList []}) [Para [Str "C:",RawInline (Format "tex") "\\Users",RawInline (Format "tex") "\\Khalid",RawInline (Format "tex") "\\Desktop",RawInline (Format "tex") "\\abp",Str ".stack-work",RawInline (Format "tex") "\\dist",Str "\\29cc6475",RawInline (Format "tex") "\\build",RawInline (Format "tex") "\\abp",Str "-test",RawInline (Format "tex") "\\abp",Str "-test.exe"]]
        but got: Pandoc (Meta {unMeta = fromList []}) [Para [Str "C:\\Users\\Khalid\\Desktop\\abp\\.stack-work\\dist\\29cc6475\\build\\abp-test\\abp-test.exe"]]

  To rerun use: --match "/Environment/environment/reads the abp binary path/"

Randomized with seed 242263652

Finished in 1.3551 seconds
43 examples, 2 failures

abp> Test suite abp-test failed
Test suite failure for package abp-0.1.8.9
    abp-test:  exited with: ExitFailure 1
Logs printed to console

The rest of the tests ran smoothly. Is this a cause for concern?

@CDSoft
Copy link
Owner

CDSoft commented Jul 19, 2020

Hello,

I would say this is not a problem unless you use environment variables. It seems getEnv or getEnvironment on Windows has a different behavior (and Pandoc sees LaTeX formula in their values). I can not reproduce this on Linux and I haven't used Windows for decades (literally, unless when forced at work ;-).

Could you run this Haskell script (e.g. with runhaskell)? Be sure there is no confidential or private information in your environment variables before posting the result ;-)

import Control.Monad

main = do
    env <- getEnvironment
    forM_ env $ \(k,v) ->
        putStrLn $ k ++ " = " ++ v

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 19, 2020

I get the following when running on Git Bash (comes with Git v2.27.0.windows.1) as well as Powershell Core (v7.0.3):

$ stack runghc abp-test.hs

abp-test.hs:4:12: error:
    Variable not in scope: getEnvironment :: IO (t0 ([Char], [Char]))
  |
4 |     env <- getEnvironment
  |            ^^^^^^^^^^^^^^

@CDSoft
Copy link
Owner

CDSoft commented Jul 19, 2020

Sorry. Yet another copy/paste error...
Try this:

import System.Environment
import Control.Monad

main = do
    env <- getEnvironment
    forM_ env $ \(k,v) ->
        putStrLn $ k ++ " = " ++ v

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 20, 2020

Using Git Bash, I get the following:

 = ::=::\
ACLOCAL_PATH = C:\Program Files\Git\mingw64\share\aclocal;C:\Program Files\Git\usr\share\aclocal
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\Khalid\AppData\Roaming
COMMONPROGRAMFILES = C:\Program Files\Common Files
COMMONPROGRAMFILES(X86) = C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432 = C:\Program Files\Common Files
COMPUTERNAME = GRANADA
COMSPEC = C:\WINDOWS\system32\cmd.exe
CONFIG_SITE = C:/Program Files/Git/mingw64/etc/config.site
DISPLAY = needs-to-be-defined
DRIVERDATA = C:\Windows\System32\Drivers\DriverData
EXEPATH = C:\Program Files\Git
GHC_ENVIRONMENT = -
GHC_PACKAGE_PATH = C:\sr\global-project\.stack-work\install\bd61ebaf\pkgdb;C:\sr\snapshots\f118bff2\pkgdb;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib\package.conf.d
HASKELL_DIST_DIR = C:\Users\Khalid\Desktop\.stack-work\dist\29cc6475
HASKELL_PACKAGE_SANDBOX = C:\sr\snapshots\f118bff2\pkgdb
HASKELL_PACKAGE_SANDBOXES = C:\sr\global-project\.stack-work\install\bd61ebaf\pkgdb;C:\sr\snapshots\f118bff2\pkgdb;
HOME = C:\Users\Khalid
HOMEDRIVE = C:
HOMEPATH = \Users\Khalid
HOSTNAME = Granada
INFOPATH = C:\Program Files\Git\usr\local\info;C:\Program Files\Git\usr\share\info;C:\Program Files\Git\usr\info;C:\Program Files\Git\share\info
LANG = en_US.UTF-8
LOCALAPPDATA = C:\Users\Khalid\AppData\Local
LOGONSERVER = \\GRANADA
MANPATH = C:\Program Files\Git\mingw64\local\man;C:\Program Files\Git\mingw64\share\man;C:\Program Files\Git\usr\local\man;C:\Program Files\Git\usr\share\man;C:\Program Files\Git\usr\man;C:\Program Files\Git\share\man
MINGW_CHOST = x86_64-w64-mingw32
MINGW_PACKAGE_PREFIX = mingw-w64-x86_64
MINGW_PREFIX = C:/Program Files/Git/mingw64
MSYSTEM = MINGW64
MSYSTEM_CARCH = x86_64
MSYSTEM_CHOST = x86_64-w64-mingw32
MSYSTEM_PREFIX = C:/Program Files/Git/mingw64
NUMBER_OF_PROCESSORS = 4
ONEDRIVE = C:\Users\Khalid\<ONEDRIVE FOLDER>
ONEDRIVECOMMERCIAL = C:\Users\Khalid\<ONEDRIVE FOLDER>
ORIGINAL_PATH = C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Khalid\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Python38-32\Scripts;C:\Program Files (x86)\Python38-32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Microsoft VS Code\bin;C:\texlive\2020\bin\win32;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Pandoc;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7;C:\Program Files\Graphviz 2.44.1\bin;C:\Users\Khalid\AppData\Roaming\local\bin;C:\Users\Khalid\AppData\Local\Microsoft\WindowsApps;D:\programs\markdown-pp;C:\Program Files (x86)\GnuWin32\bin;D:\programs\ffmpeg;C:\Program Files\7-Zip;C:\Users\Khalid\AppData\Local\atom\bin;D:\programs\plantuml
ORIGINAL_TEMP = C:/Users/Khalid/AppData/Local/Temp
ORIGINAL_TMP = C:/Users/Khalid/AppData/Local/Temp
OS = Windows_NT
PATH = C:\sr\global-project\.stack-work\install\bd61ebaf\bin;C:\sr\snapshots\f118bff2\bin;C:\sr\compiler-tools\x86_64-windows\ghc-8.8.3\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\mingw\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\usr\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\usr\local\bin;C:\Users\Khalid\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Khalid\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Python38-32\Scripts;C:\Program Files (x86)\Python38-32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Microsoft VS Code\bin;C:\texlive\2020\bin\win32;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Pandoc;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7;C:\Program Files\Graphviz 2.44.1\bin;C:\Users\Khalid\AppData\Roaming\local\bin;C:\Users\Khalid\AppData\Local\Microsoft\WindowsApps;D:\programs\markdown-pp;C:\Program Files (x86)\GnuWin32\bin;D:\programs\ffmpeg;C:\Program Files\7-Zip;C:\Users\Khalid\AppData\Local\atom\bin;D:\programs\plantuml;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
PKG_CONFIG_PATH = C:\Program Files\Git\mingw64\lib\pkgconfig;C:\Program Files\Git\mingw64\share\pkgconfig
PLINK_PROTOCOL = ssh
POWERSHELL_DISTRIBUTION_CHANNEL = MSI:Windows 10 Pro
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 3a09
PROGRAMDATA = C:\ProgramData
PROGRAMFILES = C:\Program Files
PROGRAMFILES(X86) = C:\Program Files (x86)
PROGRAMW6432 = C:\Program Files
PS1 = \[\033]0;Bash Prompt (Git for Windows) =>$PWD\007\]\n\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$
PSMODULEPATH = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC = C:\Users\Public
PWD = C:/Users/Khalid/Desktop
SESSIONNAME = Console
SHELL = C:\Program Files\Git\usr\bin\bash.exe
SHLVL = 1
SSH_ASKPASS = C:/Program Files/Git/mingw64/libexec/git-core/git-gui--askpass
STACK_EXE = C:\Users\Khalid\AppData\Roaming\local\bin\stack.exe
STACK_ROOT = C:\sr
SYSTEMDRIVE = C:
SYSTEMROOT = C:\WINDOWS
TEMP = C:\Users\Khalid\AppData\Local\Temp
TERM = xterm-256color
TERM_PROGRAM = mintty
TERM_PROGRAM_VERSION = 3.1.6
TMP = C:\Users\Khalid\AppData\Local\Temp
TMPDIR = C:\Users\Khalid\AppData\Local\Temp
USERDOMAIN = GRANADA
USERDOMAIN_ROAMINGPROFILE = GRANADA
USERNAME = Khalid
USERPROFILE = C:\Users\Khalid
WINDIR = C:\WINDOWS
_ = C:/Users/Khalid/AppData/Roaming/local/bin/stack

Using Powershell Core, I get the following:

= ::=::\
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\Khalid\AppData\Roaming
COMMONPROGRAMFILES = C:\Program Files\Common Files
COMMONPROGRAMFILES(X86) = C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432 = C:\Program Files\Common Files
COMPUTERNAME = GRANADA
COMSPEC = C:\WINDOWS\system32\cmd.exe
DRIVERDATA = C:\Windows\System32\Drivers\DriverData
GHC_ENVIRONMENT = -
GHC_PACKAGE_PATH = C:\sr\global-project\.stack-work\install\bd61ebaf\pkgdb;C:\sr\snapshots\f118bff2\pkgdb;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib\package.conf.d
HASKELL_DIST_DIR = C:\Users\Khalid\Desktop\.stack-work\dist\29cc6475
HASKELL_PACKAGE_SANDBOX = C:\sr\snapshots\f118bff2\pkgdb
HASKELL_PACKAGE_SANDBOXES = C:\sr\global-project\.stack-work\install\bd61ebaf\pkgdb;C:\sr\snapshots\f118bff2\pkgdb;
HOMEDRIVE = C:
HOMEPATH = \Users\Khalid
LOCALAPPDATA = C:\Users\Khalid\AppData\Local
LOGONSERVER = \\GRANADA
MSYSTEM = MINGW64
NUMBER_OF_PROCESSORS = 4
ONEDRIVE = C:\Users\Khalid\<ONEDRIVE FOLDER>
ONEDRIVECOMMERCIAL = C:\Users\Khalid\<ONEDRIVE FOLDER>
OS = Windows_NT
PATH = C:\sr\global-project\.stack-work\install\bd61ebaf\bin;C:\sr\snapshots\f118bff2\bin;C:\sr\compiler-tools\x86_64-windows\ghc-8.8.3\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\mingw\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\usr\bin;C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\usr\local\bin;C:\Program Files\PowerShell\7;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Python38-32\Scripts\;C:\Program Files (x86)\Python38-32\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\texlive\2020\bin\win32;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Pandoc\;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Program Files\Graphviz 2.44.1\bin;C:\Users\Khalid\AppData\Roaming\local\bin;C:\Users\Khalid\AppData\Local\Microsoft\WindowsApps;D:\programs\markdown-pp;C:\Program Files (x86)\GnuWin32\bin;D:\programs\ffmpeg;C:\Program Files\7-Zip;C:\Users\Khalid\AppData\Local\atom\bin;D:\programs\plantuml;
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL
POWERSHELL_DISTRIBUTION_CHANNEL = MSI:Windows 10 Pro
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 3a09
PROGRAMDATA = C:\ProgramData
PROGRAMFILES = C:\Program Files
PROGRAMFILES(X86) = C:\Program Files (x86)
PROGRAMW6432 = C:\Program Files
PSMODULEPATH = C:\Users\Khalid\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC = C:\Users\Public
SESSIONNAME = Console
STACK_EXE = C:\Users\Khalid\AppData\Roaming\local\bin\stack.exe
STACK_ROOT = C:\sr
SYSTEMDRIVE = C:
SYSTEMROOT = C:\WINDOWS
TEMP = C:\Users\Khalid\AppData\Local\Temp
TMP = C:\Users\Khalid\AppData\Local\Temp
USERDOMAIN = GRANADA
USERDOMAIN_ROAMINGPROFILE = GRANADA
USERNAME = Khalid
USERPROFILE = C:\Users\Khalid
WINDIR = C:\WINDOWS
__COMPAT_LAYER = DetectorsAppHealth

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

Well, everything looks fine. I don't understand why Pandoc sees LaTeX formulas in variable values such as "\foo\bar".
What does the following command gives in your environment ?

$ echo "\\foo\\bar" | pandoc -t native  
[Para [Str "\foo\bar"]]

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 20, 2020

I get the following using Pandoc v2.10:

$ echo "\\foo\\bar" | pandoc -t native
[Para [RawInline (Format "tex") "\\foo",RawInline (Format "tex") "\\bar"]]

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

ok, with pandoc 2.9.1.1 I have a different behavior. I'll check the latest version of pandoc.

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

BTW, did you build abp with stack and LTS-15.12?
The pandoc version in LTS-15.12 is 2.9.1.1.

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

No differences with Pandoc 2.10 (Linux).

▶ echo "\\foo\\bar" | ./pandoc -t native                                                     
[Para [Str "\foo\bar"]]

▶ ./pandoc -v                                                          
pandoc 2.10
Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
Default user data directory: /home/christ/.local/share/pandoc or /home/christ/.pandoc
Copyright (C) 2006-2020 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

@khalid-hussain
Copy link
Author

BTW, did you build abp with stack and LTS-15.12?
The pandoc version in LTS-15.12 is 2.9.1.1.

I'm sorry, I don't know Haskell and am not familiar with the terminology. I like and use pp and decided to upgrade to abp for future projects. I just downloaded Stack to build abp by running the commands stated in the README.

@khalid-hussain
Copy link
Author

Here is my Stack version:

Current Stack version: 2.3.1, available download version: 2.3.1
Skipping binary upgrade, you are already running the most recent version

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

Same results with the Windows binaries on wine:

▶ echo "\\foo\\bar" | wine ./pandoc.exe -t native
[Para [Str "\foo\bar"]]

▶ wine ./pandoc.exe -v      
pandoc.exe 2.10
Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
Default user data directory: C:\users\christ\Application Data\pandoc
Copyright (C) 2006-2020 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 20, 2020

Same results with the Windows binaries on wine:

▶ echo "\\foo\\bar" | wine ./pandoc.exe -t native
[Para [Str "\foo\bar"]]

▶ wine ./pandoc.exe -v      
pandoc.exe 2.10
Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
Default user data directory: C:\users\christ\Application Data\pandoc
Copyright (C) 2006-2020 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

Okay. Git Bash is the cause of the problem. Powershell Core gives the following:

PS C:\Users\Khalid\Desktop> echo "\\foo\\bar" | pandoc -t native
[Para [Str "\\foo\\bar"]]

Using Command Prompt (cmd.exe) gives the following:

C:\Users\Khalid>echo "\\foo\\bar" | pandoc -t native
[Para [Quoted DoubleQuote [Str "\\foo\\bar"]]]

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

pandoc -v gives a directory in which the default options can be changed. Do you have files in this directory?

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 20, 2020

The folder doesn't exist. I didn't create it.

For reference, the directory is C:\Users\Khalid\AppData\Roaming\pandoc

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

You said PS and cmd.exe works as expected:

Using Command Prompt (cmd.exe) gives the following:

C:\Users\Khalid>echo "\\foo\\bar" | pandoc -t native
[Para [Quoted DoubleQuote [Str "\\foo\\bar"]]]

but it seems the double slash is not interpreted as in bash.
Can you try this:

C:\Users\Khalid>echo "\foo\bar" | pandoc -t native

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 20, 2020

I'm sorry I gave that impression. Yes, it's not what you're getting.

Git Bash

$ echo "\foo\bar" | pandoc -t native
[Para [RawInline (Format "tex") "\\foo",RawInline (Format "tex") "\\bar"]]

Powershell Core

PS C:\Users\Khalid> echo "\foo\bar" | pandoc -t native
[Para [RawInline (Format "tex") "\\foo",RawInline (Format "tex") "\\bar"]]

CMD

C:\Users\Khalid>echo "\foo\bar" | pandoc -t native
[Para [Quoted DoubleQuote [RawInline (Format "tex") "\\foo",RawInline (Format "tex") "\\bar"]]]

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

At least, it is more homogeneous ;-)

@khalid-hussain
Copy link
Author

Git Bash and Powershell Core give the same result. CMD is on some other planet. I doubt anyone would use CMD to build abp.

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

Ok, I finally got the same behavior by disabling the shell interpretation:

$ echo -E "\\foo\\bar" | pandoc -t native
[Para [RawInline (Format "tex") "\\foo",RawInline (Format "tex") "\\bar"]]

So the problem is actually the Windows path separator.
This mean that abp work work as expected with environment variables containing backslashes.

I can change the test to put the expected value in a code block so that Pandoc won't interpret it.

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

This is due to a default extention of the Pandoc markdown format. Without this it works as expected:

$ echo -E "\\foo\\bar" | pandoc -f markdown-raw_tex -t native
[Para [Str "\\foo\\bar"]]

@CDSoft
Copy link
Owner

CDSoft commented Jul 20, 2020

I made a quick fix.
In fact using path outside a code block is not a good idea since pandoc may interpret it in an unexpected way.
I let you test it on Windows.

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 21, 2020

Running stack install on Git Bash once again gives the following:

scientific          > using precompiled package
base16-bytestring   > configure
attoparsec          > using precompiled package
socks               > using precompiled package
split               > using precompiled package
base16-bytestring   > Configuring base16-bytestring-0.1.1.7...
base16-bytestring   > build
blaze-markup        > configure
base16-bytestring   > Preprocessing library for base16-bytestring-0.1.1.7..
base16-bytestring   > Building library for base16-bytestring-0.1.1.7..
base16-bytestring   > [1 of 2] Compiling Data.ByteString.Base16
base16-bytestring   > [2 of 2] Compiling Data.ByteString.Base16.Lazy
blaze-markup        > Configuring blaze-markup-0.8.2.7...
base16-bytestring   > copy/register
base16-bytestring   > Installing library in C:\sr\snapshots\f118bff2\lib\x86_64-windows-ghc-8.8.3\base16-bytestring-0.1.1.7-38Usg4k0tdi3CjF7jttVEt
base16-bytestring   > Registering library for base16-bytestring-0.1.1.7..
strict              > using precompiled package
syb                 > using precompiled package
blaze-markup        > build
safe                > configure
blaze-markup        > Preprocessing library for blaze-markup-0.8.2.7..
blaze-markup        > Building library for blaze-markup-0.8.2.7..
tagged              > using precompiled package
tagsoup             > using precompiled package
blaze-markup        > [1 of 6] Compiling Text.Blaze.Internal
temporary           > using precompiled package
blaze-markup        >
blaze-markup        > src\Text\Blaze\Internal.hs:82:1: warning: [-Wunused-imports]
blaze-markup        >     The import of `Control.Applicative' is redundant
blaze-markup        >       except perhaps to import instances from `Control.Applicative'
blaze-markup        >     To import instances alone, use: import Control.Applicative()
blaze-markup        >    |
blaze-markup        > 82 | import           Control.Applicative    (Applicative (..))
blaze-markup        >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blaze-markup        >
blaze-markup        > src\Text\Blaze\Internal.hs:84:1: warning: [-Wunused-imports]
blaze-markup        >     The import of `Data.Monoid' is redundant
blaze-markup        >       except perhaps to import instances from `Data.Monoid'
blaze-markup        >     To import instances alone, use: import Data.Monoid()
blaze-markup        >    |
blaze-markup        > 84 | import           Data.Monoid            (Monoid, mappend, mconcat, mempty)
blaze-markup        >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hslua-module-system > using precompiled package
th-abstraction      > using precompiled package
safe                > Configuring safe-0.3.19...
time-compat         > using precompiled package
blaze-markup        > [2 of 6] Compiling Text.Blaze
blaze-markup        >
blaze-markup        > src\Text\Blaze.hs:92:1: warning: [-Wunused-imports]
blaze-markup        >     The import of `Data.Monoid' is redundant
blaze-markup        >       except perhaps to import instances from `Data.Monoid'
blaze-markup        >     To import instances alone, use: import Data.Monoid()
blaze-markup        >    |
blaze-markup        > 92 | import           Data.Monoid            (mconcat)
blaze-markup        >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
blaze-markup        >
blaze-markup        > src\Text\Blaze.hs:93:1: warning: [-Wunused-imports]
blaze-markup        >     The import of `Word' from module `Data.Word' is redundant
blaze-markup        >    |
blaze-markup        > 93 | import           Data.Word              (Word, Word32, Word64)
blaze-markup        >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
transformers-compat > using precompiled package
blaze-markup        > [3 of 6] Compiling Text.Blaze.Renderer.String
Glob                > using precompiled package
safe                > build
splitmix            > configure
unicode-transforms  > using precompiled package
safe                > Preprocessing library for safe-0.3.19..
safe                > Building library for safe-0.3.19..
blaze-markup        > [4 of 6] Compiling Text.Blaze.Renderer.Pretty
unordered-containers> using precompiled package
safe                > [1 of 5] Compiling Safe.Partial
blaze-markup        > [5 of 6] Compiling Text.Blaze.Renderer.Text
blaze-markup        >
blaze-markup        > src\Text\Blaze\Renderer\Text.hs:15:1: warning: [-Wunused-imports]
blaze-markup        >     The import of `Data.Monoid' is redundant
blaze-markup        >       except perhaps to import instances from `Data.Monoid'
blaze-markup        >     To import instances alone, use: import Data.Monoid()
blaze-markup        >    |
blaze-markup        > 15 | import Data.Monoid (mappend, mempty)
blaze-markup        >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
utf8-string         > using precompiled package
safe                > [2 of 5] Compiling Safe.Util
uri-encode          > using precompiled package
safe                > [3 of 5] Compiling Safe.Foldable
splitmix            > Configuring splitmix-0.0.5...
safe                > [4 of 5] Compiling Safe.Exact
safe                > [5 of 5] Compiling Safe
splitmix            > build
uuid-types          > configure
splitmix            > Preprocessing library for splitmix-0.0.5..
splitmix            > Building library for splitmix-0.0.5..
splitmix            > [1 of 3] Compiling Data.Bits.Compat
splitmix            > [2 of 3] Compiling System.Random.SplitMix
safe                > copy/register
safe                > Installing library in C:\sr\snapshots\f118bff2\lib\x86_64-windows-ghc-8.8.3\safe-0.3.19-LxDJURZu1921pHCEJqjvRE
uuid-types          > Configuring uuid-types-1.0.3...
safe                > Registering library for safe-0.3.19..
splitmix            > [3 of 3] Compiling System.Random.SplitMix32
blaze-markup        > [6 of 6] Compiling Text.Blaze.Renderer.Utf8
blaze-markup        >
blaze-markup        > src\Text\Blaze\Renderer\Utf8.hs:11:1: warning: [-Wunused-imports]
blaze-markup        >     The import of `Data.Monoid' is redundant
blaze-markup        >       except perhaps to import instances from `Data.Monoid'
blaze-markup        >     To import instances alone, use: import Data.Monoid()
blaze-markup        >    |
blaze-markup        > 11 | import Data.Monoid (mappend, mempty)
blaze-markup        >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
splitmix            > copy/register
uuid-types          > build
splitmix            > Installing library in C:\sr\snapshots\f118bff2\lib\x86_64-windows-ghc-8.8.3\splitmix-0.0.5-inm33kruRIL3MoAEVOOwx
uuid-types          > Preprocessing library for uuid-types-1.0.3..
uuid-types          > Building library for uuid-types-1.0.3..
doclayout           > configure
splitmix            > Registering library for splitmix-0.0.5..
uuid-types          > [1 of 3] Compiling Data.UUID.Types.Internal.Builder
uuid-types          > [2 of 3] Compiling Data.UUID.Types.Internal
uuid-types          >
uuid-types          > Data\UUID\Types\Internal.hs:41:1: warning: [-Wunused-imports]
uuid-types          >     The import of `Control.Applicative' is redundant
uuid-types          >       except perhaps to import instances from `Control.Applicative'
uuid-types          >     To import instances alone, use: import Control.Applicative()
uuid-types          >    |
uuid-types          > 41 | import Control.Applicative ((<*>))
uuid-types          >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uuid-types          >
uuid-types          > Data\UUID\Types\Internal.hs:44:1: warning: [-Wunused-imports]
uuid-types          >     The import of `Data.Functor' is redundant
uuid-types          >       except perhaps to import instances from `Data.Functor'
uuid-types          >     To import instances alone, use: import Data.Functor()
uuid-types          >    |
uuid-types          > 44 | import Data.Functor ((<$>))
uuid-types          >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
doclayout           > Configuring doclayout-0.3...
doclayout           > build
QuickCheck          > configure
doclayout           > Preprocessing library for doclayout-0.3..
doclayout           > Building library for doclayout-0.3..
doclayout           > [1 of 1] Compiling Text.DocLayout
uuid-types          > [3 of 3] Compiling Data.UUID.Types
blaze-markup        >
blaze-markup        > copy/register
blaze-markup        > Installing library in C:\sr\snapshots\f118bff2\lib\x86_64-windows-ghc-8.8.3\blaze-markup-0.8.2.7-Fe7fDvtZLUKtIQPk0OdwX
QuickCheck          > Configuring QuickCheck-2.13.2...
uuid-types          >
blaze-markup        > Registering library for blaze-markup-0.8.2.7..
uuid-types          > copy/register
uuid-types          > Installing library in C:\sr\snapshots\f118bff2\lib\x86_64-windows-ghc-8.8.3\uuid-types-1.0.3-Hdhjbfza64Z9j295dhULU2
uuid-types          > Registering library for uuid-types-1.0.3..
QuickCheck          > build
blaze-html          > configure
QuickCheck          > Preprocessing library for QuickCheck-2.13.2..
QuickCheck          > Building library for QuickCheck-2.13.2..
blaze-html          > Configuring blaze-html-0.9.1.2...
QuickCheck          >
QuickCheck          > Access violation in generated code when writing 0x0
QuickCheck          >
QuickCheck          >  Attempting to reconstruct a stack trace...
QuickCheck          >
QuickCheck          >    Frame  Code address
QuickCheck          >  * 0x461da80      0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
QuickCheck          >  * 0x461da88      0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
QuickCheck          >  * 0x461da90      0x2d0
QuickCheck          >  * 0x461da98      0x5
QuickCheck          >  * 0x461daa0      0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
QuickCheck          >  * 0x461daa8      0x6514910
QuickCheck          >
blaze-html          >
blaze-html          > Access violation in generated code when writing 0x0
blaze-html          >
blaze-html          >  Attempting to reconstruct a stack trace...
blaze-html          >
blaze-html          >    Frame  Code address
blaze-html          >  * 0x461da80      0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
blaze-html          >  * 0x461da88      0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
blaze-html          >  * 0x461da90      0x2d0
blaze-html          >  * 0x461da98      0x5
blaze-html          >  * 0x461daa0      0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
blaze-html          >  * 0x461daa8      0x66e60b0
blaze-html          >
errors              > configure
errors              > Configuring errors-2.3.0...
doclayout           > copy/register
doclayout           > Installing library in C:\sr\snapshots\f118bff2\lib\x86_64-windows-ghc-8.8.3\doclayout-0.3-AzyB8RcCTip7V6QrgecWEz
doclayout           > Registering library for doclayout-0.3..
errors              > build
errors              > Preprocessing library for errors-2.3.0..
errors              > Building library for errors-2.3.0..
errors              > [1 of 5] Compiling Control.Error.Util
errors              > [2 of 5] Compiling Control.Error.Safe
errors              >
errors              > Access violation in generated code when writing 0x0
errors              >
errors              >  Attempting to reconstruct a stack trace...
errors              >
errors              >    Frame  Code address
errors              >  * 0x461da80      0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
errors              >  * 0x461da88      0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
errors              >  * 0x461da90      0x2d0
errors              >  * 0x461da98      0x5
errors              >  * 0x461daa0      0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
errors              >  * 0x461daa8      0x8099800
errors              >

--  While building package errors-2.3.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11


--  While building package blaze-html-0.9.1.2 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\f118bff2\pkgdb --libdir=C:\sr\snapshots\f118bff2\lib --bindir=C:\sr\snapshots\f118bff2\bin --datadir=C:\sr\snapshots\f118bff2\share --libexecdir=C:\sr\snapshots\f118bff2\libexec --sysconfdir=C:\sr\snapshots\f118bff2\etc --docdir=C:\sr\snapshots\f118bff2\doc\blaze-html-0.9.1.2 --htmldir=C:\sr\snapshots\f118bff2\doc\blaze-html-0.9.1.2 --haddockdir=C:\sr\snapshots\f118bff2\doc\blaze-html-0.9.1.2 --dependency=base=base-4.13.0.0 --dependency=blaze-builder=blaze-builder-0.4.1.0-I5KDHFCu1vgI5dETHU1xLJ --dependency=blaze-markup=blaze-markup-0.8.2.7-Fe7fDvtZLUKtIQPk0OdwX --dependency=bytestring=bytestring-0.10.10.0 --dependency=text=text-1.2.4.0 --extra-include-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 11


--  While building package QuickCheck-2.13.2 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11
Progress 27/54

Since it was already installed and I was just making sure the change didn't affect anything, I ran stack test after the previous failure and got the following:

QuickCheck      > configure
QuickCheck      > Configuring QuickCheck-2.13.2...
QuickCheck      > build
aeson-pretty    > configure
QuickCheck      > Preprocessing library for QuickCheck-2.13.2..
QuickCheck      > Building library for QuickCheck-2.13.2..
aeson-pretty    > Configuring aeson-pretty-0.8.8...
QuickCheck      >
QuickCheck      > Access violation in generated code when writing 0x0
QuickCheck      >
QuickCheck      >  Attempting to reconstruct a stack trace...
QuickCheck      >
QuickCheck      >    Frame      Code address
QuickCheck      >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
QuickCheck      >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
QuickCheck      >  * 0x461da90  0x2d0
QuickCheck      >  * 0x461da98  0x5
QuickCheck      >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
QuickCheck      >  * 0x461daa8  0x679f910
QuickCheck      >
aeson-pretty    >
aeson-pretty    > Access violation in generated code when writing 0x0
aeson-pretty    >
aeson-pretty    >  Attempting to reconstruct a stack trace...
aeson-pretty    >
aeson-pretty    >    Frame      Code address
aeson-pretty    >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
aeson-pretty    >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
aeson-pretty    >  * 0x461da90  0x2d0
aeson-pretty    >  * 0x461da98  0x5
aeson-pretty    >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
aeson-pretty    >  * 0x461daa8  0x66e9110
aeson-pretty    >
blaze-html      > configure
blaze-html      > Configuring blaze-html-0.9.1.2...
blaze-html      > build
errors          > configure
blaze-html      > Preprocessing library for blaze-html-0.9.1.2..
blaze-html      > Building library for blaze-html-0.9.1.2..
blaze-html      > [ 1 of 21] Compiling Text.Blaze.Html
blaze-html      > [ 2 of 21] Compiling Text.Blaze.Html.Renderer.Pretty
blaze-html      > [ 3 of 21] Compiling Text.Blaze.Html.Renderer.String
errors          > Configuring errors-2.3.0...
errors          >
errors          > Access violation in generated code when writing 0x0
blaze-html      >
blaze-html      > Access violation in generated code when writing 0x0
errors          >
errors          >  Attempting to reconstruct a stack trace...
errors          >
errors          >    Frame      Code address
errors          >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
errors          >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
errors          >  * 0x461da90  0x2d0
errors          >  * 0x461da98  0x5
errors          >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
errors          >  * 0x461daa8  0x66e8110
errors          >
blaze-html      >
blaze-html      >  Attempting to reconstruct a stack trace...
blaze-html      >
blaze-html      >    Frame      Code address
blaze-html      >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
blaze-html      >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
blaze-html      >  * 0x461da90  0x2d0
blaze-html      >  * 0x461da98  0x5
blaze-html      >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
blaze-html      >  * 0x461daa8  0x79b2c60
blaze-html      >
hspec-discover  > configure
hspec-discover  > Configuring hspec-discover-2.7.1...
hspec-discover  > build
http-client     > configure
hspec-discover  > Preprocessing library for hspec-discover-2.7.1..
hspec-discover  > Building library for hspec-discover-2.7.1..
hspec-discover  > [1 of 4] Compiling Paths_hspec_discover
hspec-discover  > [2 of 4] Compiling Test.Hspec.Discover.Config
http-client     > Configuring http-client-0.6.4.1...
hspec-discover  >
hspec-discover  > Access violation in generated code when writing 0x0
hspec-discover  >
hspec-discover  >  Attempting to reconstruct a stack trace...
hspec-discover  >
hspec-discover  >    Frame      Code address
hspec-discover  >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
hspec-discover  >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
hspec-discover  >  * 0x461da90  0x2d0
hspec-discover  >  * 0x461da98  0x5
hspec-discover  >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
hspec-discover  >  * 0x461daa8  0x67c85d0
hspec-discover  >
http-client     >
http-client     > Access violation in generated code when writing 0x0
http-client     >
http-client     >  Attempting to reconstruct a stack trace...
http-client     >
http-client     >    Frame      Code address
http-client     >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
http-client     >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
http-client     >  * 0x461da90  0x2d0
http-client     >  * 0x461da98  0x5
http-client     >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
http-client     >  * 0x461daa8  0x66e8110
http-client     >
xml             > configure
xml             > Configuring xml-1.3.14...
xml             > build
xml             > Preprocessing library for xml-1.3.14..
xml             > Building library for xml-1.3.14..
xml             > [1 of 7] Compiling Text.XML.Light.Types
xml             > [2 of 7] Compiling Text.XML.Light.Proc
xml             > [3 of 7] Compiling Text.XML.Light.Output
xml             > [4 of 7] Compiling Text.XML.Light.Lexer
xml             >
xml             > Text\XML\Light\Lexer.hs:119:1: warning: [-Wtabs]
xml             >     Tab character found here, and in one further location.
xml             >     Please use spaces instead.
xml             >     |
xml             > 119 |          | otherwise           = munch ('>':acc) (nesting-1) ds
xml             >     | ^^^^^^^^
xml             > [5 of 7] Compiling Text.XML.Light.Input
xml             > [6 of 7] Compiling Text.XML.Light.Cursor
xml             >
xml             > Access violation in generated code when writing 0x0
xml             >
xml             >  Attempting to reconstruct a stack trace...
xml             >
xml             >    Frame      Code address
xml             >  * 0x461da80  0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
xml             >  * 0x461da88  0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
xml             >  * 0x461da90  0x2d0
xml             >  * 0x461da98  0x5
xml             >  * 0x461daa0  0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
xml             >  * 0x461daa8  0xa5ecd20
xml             >

--  While building package xml-1.3.14 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11


--  While building package http-client-0.6.4.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\f118bff2\pkgdb --libdir=C:\sr\snapshots\f118bff2\lib --bindir=C:\sr\snapshots\f118bff2\bin --datadir=C:\sr\snapshots\f118bff2\share --libexecdir=C:\sr\snapshots\f118bff2\libexec --sysconfdir=C:\sr\snapshots\f118bff2\etc --docdir=C:\sr\snapshots\f118bff2\doc\http-client-0.6.4.1 --htmldir=C:\sr\snapshots\f118bff2\doc\http-client-0.6.4.1 --haddockdir=C:\sr\snapshots\f118bff2\doc\http-client-0.6.4.1 --dependency=Win32=Win32-2.6.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=blaze-builder=blaze-builder-0.4.1.0-I5KDHFCu1vgI5dETHU1xLJ --dependency=bytestring=bytestring-0.10.10.0 --dependency=case-insensitive=case-insensitive-1.2.1.0-3V9HnJ59G423CQPOs7nwss --dependency=containers=containers-0.6.2.1 --dependency=cookie=cookie-0.4.5-4LRFCRUtIDF7kZMzmdKiP --dependency=deepseq=deepseq-1.4.4.0 --dependency=exceptions=exceptions-0.10.4-6ENJVzINLe28VlhOUrvEZK --dependency=filepath=filepath-1.4.2.1 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=http-types=http-types-0.12.3-B9EkuT6UGia2QJglhdFRHH --dependency=memory=memory-0.15.0-DnuI2W0OlFg2sOyBNp74A5 --dependency=mime-types=mime-types-0.1.0.9-GqDQlebQXmwI1DHlppvY9F --dependency=network=network-3.1.1.1-H5yw1GXuMJB7JJ4oD68Cdy --dependency=network-uri=network-uri-2.6.3.0-CPjS2hnZr1IIlGhZ1dITqG --dependency=random=random-1.1-CUqV1zxrwrE4K5XCdTZSYy --dependency=safe=safe-0.3.19-LxDJURZu1921pHCEJqjvRE --dependency=stm=stm-2.5.0.0 --dependency=streaming-commons=streaming-commons-0.2.1.2-7nSvofLzcDVEO2jjCYKFuK --dependency=text=text-1.2.4.0 --dependency=time=time-1.9.3 --dependency=transformers=transformers-0.5.6.2 -fnetwork-uri --extra-include-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 11


--  While building package hspec-discover-2.7.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11


--  While building package blaze-html-0.9.1.2 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11


--  While building package errors-2.3.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\f118bff2\pkgdb --libdir=C:\sr\snapshots\f118bff2\lib --bindir=C:\sr\snapshots\f118bff2\bin --datadir=C:\sr\snapshots\f118bff2\share --libexecdir=C:\sr\snapshots\f118bff2\libexec --sysconfdir=C:\sr\snapshots\f118bff2\etc --docdir=C:\sr\snapshots\f118bff2\doc\errors-2.3.0 --htmldir=C:\sr\snapshots\f118bff2\doc\errors-2.3.0 --haddockdir=C:\sr\snapshots\f118bff2\doc\errors-2.3.0 --dependency=base=base-4.13.0.0 --dependency=exceptions=exceptions-0.10.4-6ENJVzINLe28VlhOUrvEZK --dependency=safe=safe-0.3.19-LxDJURZu1921pHCEJqjvRE --dependency=text=text-1.2.4.0 --dependency=transformers=transformers-0.5.6.2 --dependency=transformers-compat=transformers-compat-0.6.5-4FrvPCFBsgnJ9PLf29P7hZ --extra-include-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 11


--  While building package aeson-pretty-0.8.8 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\f118bff2\pkgdb --libdir=C:\sr\snapshots\f118bff2\lib --bindir=C:\sr\snapshots\f118bff2\bin --datadir=C:\sr\snapshots\f118bff2\share --libexecdir=C:\sr\snapshots\f118bff2\libexec --sysconfdir=C:\sr\snapshots\f118bff2\etc --docdir=C:\sr\snapshots\f118bff2\doc\aeson-pretty-0.8.8 --htmldir=C:\sr\snapshots\f118bff2\doc\aeson-pretty-0.8.8 --haddockdir=C:\sr\snapshots\f118bff2\doc\aeson-pretty-0.8.8 --dependency=aeson=aeson-1.4.7.1-1JbJIO5Ik18ItTRHp4bDDI --dependency=attoparsec=attoparsec-0.13.2.4-K4YDSisk3Ve1wRNN9lhNEg --dependency=base=base-4.13.0.0 --dependency=base-compat=base-compat-0.11.1-BAcgBjX7dB810iQQDNDPZr --dependency=bytestring=bytestring-0.10.10.0 --dependency=cmdargs=cmdargs-0.10.20-3vykGHDI4u11ZYJ5Aek1JG --dependency=scientific=scientific-0.3.6.2-88AAZ2094ShCvz9CIiUOKQ --dependency=text=text-1.2.4.0 --dependency=unordered-containers=unordered-containers-0.2.10.0-KujsThAgCnwGXBG7PJnkNO --dependency=vector=vector-0.12.1.2-AWRYcz9jfa25Avs2q9Jg9V -f-lib-only --extra-include-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 11


--  While building package QuickCheck-2.13.2 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11
Progress 7/21

@CDSoft
Copy link
Owner

CDSoft commented Jul 21, 2020

It seems there is a bug in ghc.

You can try an older ghc version by changing the repository version in stack.yaml:

resolver: lts-15.12

@khalid-hussain
Copy link
Author

khalid-hussain commented Jul 21, 2020

Now I get this:

abp> configure (lib + exe)
Configuring abp-0.1.8.10...
abp> build (lib + exe)
Preprocessing library for abp-0.1.8.10..
Building library for abp-0.1.8.10..
[ 5 of 16] Compiling Patterns

Access violation in generated code when writing 0x0

 Attempting to reconstruct a stack trace...

   Frame        Code address
 * 0x461da80    0x37f7b66 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66
 * 0x461da88    0x3277bb9 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9
 * 0x461da90    0x2d0
 * 0x461da98    0x5
 * 0x461daa0    0x3d7dc22 C:\Users\Khalid\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22
 * 0x461daa8    0x8f850f0


--  While building package abp-0.1.8.10 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build lib:abp exe:abp --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 11

The part of stack.yaml which I changed:

# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
# resolver: lts-16.5
resolver: lts-15.12

@CDSoft
Copy link
Owner

CDSoft commented Dec 22, 2023

Sorry for the late reply... Please keep in mind that abp is not supported anymore, it's hard to deploy. For new projects I suggest panda and/or ypp which are based on a Lua interpreter and way easier to compile and install and binaries are easier to produce (thanks to zig) and deploy (see hey).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants