cabal-extras icon indicating copy to clipboard operation
cabal-extras copied to clipboard

cabal-env create .ghc directory before executing in it.

Open phadej opened this issue 5 years ago • 2 comments

phadej avatar Dec 25 '19 16:12 phadej

I just hit this in windows: i have %APPDATA%\ghc but still no %APPDATA%\ghc\x86_64-mingw32-8.10.5 and:

PS D:\dev\ws\haskell\cabal-test> cabal-env --list
[   0.01119] ghc.info: ghc
[   0.14206] process.0.start: cwd=C:\TEMP ghc --info
[  10.82551] process.0.time: 10.675 seconds
[  10.84498] peu.exception: SomeException
C:\Users\atrey\AppData\Roaming\ghc\x86_64-mingw32-8.10.5\environments: getDirectoryContents:findFirstFile: does not exist (El sistema no puede encontrar la ruta especificada.)

jneira avatar Jun 22 '21 19:06 jneira

I got the same thing on macOS.

# cabal-extras repo
> cabal install cabal-env:exe:cabal-env
> cabal-env --list
[   0.00000] ghc.info: ghc
[   0.00030] process.0.start: cwd=/var/folders/31/zb67fgcs66q4n3cs_wn134zr0000gn/T/ ghc --info
[   0.23369] peu.exception: SomeException
/Users/pdejoux/.ghc/x86_64-darwin-9.2.2/environments:
getDirectoryContents:openDirStream: does not exist (No such file or directory)

But then I tried to reproduce cabal's quickjobs workflow and now get no exception with list.

# cabal repo
> cabal-env --transitive QuickCheck
[   0.00001] ghc.info: ghc
[   0.00313] process.0.start: cwd=/var/folders/31/zb67fgcs66q4n3cs_wn134zr0000gn/T/ ghc --info
[   0.11154] debug: GHC environment path: /Users/pdejoux/.ghc/x86_64-darwin-8.10.7/environments/default
[   0.11291] cabal.plan: ... plan input summary TODO ...
[   0.11412] process.1.start:
cwd=/private/var/folders/31/zb67fgcs66q4n3cs_wn134zr0000gn/T/peura-XXXX-4b5a8722060ba021
cabal v2-build all --builddir=dist-newstyle
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - fake-package-0 (lib) (first run)
Configuring library for fake-package-0..
Building library for fake-package-0..
[   6.07292] debug: writing environment file
[   6.07752] peu.completed: OK
> cabal-env --list
[   0.00000] ghc.info: ghc
[   0.00029] process.0.start: cwd=/var/folders/31/zb67fgcs66q4n3cs_wn134zr0000gn/T/ ghc --info
[   0.09829] info: default
[   0.09850] peu.completed: OK

philderbeast avatar May 17 '22 18:05 philderbeast