Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Creation of new project fails #503

Closed
mnn opened this issue Jan 29, 2020 · 5 comments
Closed

Creation of new project fails #503

mnn opened this issue Jan 29, 2020 · 5 comments

Comments

@mnn
Copy link

mnn commented Jan 29, 2020

There is something wrong with --stack-root path:

null\rikvdkleij\intellij-haskell\cache\lts-13
...
option --stack-root: InvalidAbsDir "null\\rikvdkleij\\intellij-haskell\\cache\\lts-13"
28/01/2020
21:31	Executing `C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install hlint` failed: C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install hlint:
			option --stack-root: InvalidAbsDir "null\\rikvdkleij\\intellij-haskell\\cache\\lts-13"
			Usage: stack.exe [--help] [--version] [--numeric-version]
			[--hpack-numeric-version] [--docker*] [--nix*]
			([--verbosity VERBOSITY] | [-v|--verbose] | [--silent])
			[--[no-]time-in-log] [--stack-root STACK-ROOT]
			[--work-dir WORK-DIR] [--[no-]system-ghc] [--[no-]install-ghc]
			[--arch ARCH] [--ghc-variant VARIANT] [--ghc-build BUILD]
			... (show balloon)

21:31	Executing `C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install hoogle` failed: C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install hoogle:
			option --stack-root: InvalidAbsDir "null\\rikvdkleij\\intellij-haskell\\cache\\lts-13"
			Usage: stack.exe [--help] [--version] [--numeric-version]
			[--hpack-numeric-version] [--docker*] [--nix*]
			([--verbosity VERBOSITY] | [-v|--verbose] | [--silent])
			[--[no-]time-in-log] [--stack-root STACK-ROOT]
			[--work-dir WORK-DIR] [--[no-]system-ghc] [--[no-]install-ghc]
			[--arch ARCH] [--ghc-variant VARIANT] [--ghc-build BUILD]
			... (show balloon)

21:31	Executing `C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install stylish-haskell` failed: C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install stylish-haskell:
			option --stack-root: InvalidAbsDir "null\\rikvdkleij\\intellij-haskell\\cache\\lts-13"
			Usage: stack.exe [--help] [--version] [--numeric-version]
			[--hpack-numeric-version] [--docker*] [--nix*]
			([--verbosity VERBOSITY] | [-v|--verbose] | [--silent])
			[--[no-]time-in-log] [--stack-root STACK-ROOT]
			[--work-dir WORK-DIR] [--[no-]system-ghc] [--[no-]install-ghc]
			[--arch ARCH] [--ghc-variant VARIANT] [--ghc-build BUI... (show balloon)

21:31	Executing `C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install hindent` failed: C:/Users/Xxx/AppData/Roaming/local/bin/stack.exe --system-ghc -j1 --stack-root null\rikvdkleij\intellij-haskell\cache\lts-13 --resolver lts-13 --local-bin-path null\rikvdkleij\intellij-haskell\cache\lts-13\bin install hindent:
			option --stack-root: InvalidAbsDir "null\\rikvdkleij\\intellij-haskell\\cache\\lts-13"
			Usage: stack.exe [--help] [--version] [--numeric-version]
			[--hpack-numeric-version] [--docker*] [--nix*]
			([--verbosity VERBOSITY] | [-v|--verbose] | [--silent])
			[--[no-]time-in-log] [--stack-root STACK-ROOT]
			[--work-dir WORK-DIR] [--[no-]system-ghc] [--[no-]install-ghc]
			[--arch ARCH] [--ghc-variant VARIANT] [--ghc-build BUILD]
			... (show balloon)

Windows 10, plugin beta57

@rikvdkleij
Copy link
Owner

Thanks for reporting!

Looks like a bug in https://github.com/soc/directories-jvm. That directory which starts with null is obtained via this library.

@mnn
Copy link
Author

mnn commented Jan 31, 2020

You are right, it looks like this issue. It seems some JDK changes are responsible.

Maybe try the suggested workaround?

Calling System.setProperty("jdk.lang.Process.allowAmbiguousCommands", "true") before the calls to directories-jvm seems to fix the issue \o/

rikvdkleij added a commit that referenced this issue Feb 2, 2020
@mnn
Copy link
Author

mnn commented Feb 4, 2020

After some stumbling I managed to build the master and the null path issue seems to be fixed. Unfortunately we (I am helping a friend with Windows) only got one step further. Project looks to be created (directory structure, few hs files), but the plugin (or other tool ran by the plugin) has some problem with running the compiler.

Messages panel:

Error:�[0mFound an invalid compiler at "C:\\Users\\Xxx\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.6.5\\bin\\ghc-8.6.5.EXE": Received ExitFailure 1 when running

Event log panel:

04/02/2020
08:33	Project won't be built because building its dependencies failed

08:33	[global-stack-repl] Stack REPL couldn't be started within 30 seconds

08:33	[global-stack-repl] stty: 'standard input': Inappropriate ioctl for device

08:34	[project-stack-repl-Haskell-playground:lib] Stack REPL couldn't be started within 30 seconds

08:34	[project-stack-repl-Haskell-playground:lib] stty: 'standard input': Inappropriate ioctl for device

08:34	[global-stack-repl] Stack REPL couldn't be started within 30 seconds

08:34	[global-stack-repl] stty: 'standard input': Inappropriate ioctl for device

08:34	[global-stack-repl] Stack REPL couldn't be started within 30 seconds

08:34	[global-stack-repl] stty: 'standard input': Inappropriate ioctl for device

08:34	Executing `ghc-pkg dump` failed

08:34	Hoogle database doesn't exist. Hoogle features can be enabled by menu option `Haskell`/`(Re)Build Hoogle database`

08:34	[global-stack-repl] Stack REPL couldn't be started within 30 seconds

08:34	[global-stack-repl] stty: 'standard input': Inappropriate ioctl for device

08:34	[global-stack-repl] Stack REPL couldn't be started within 30 seconds

08:34	[global-stack-repl] stty: 'standard input': Inappropriate ioctl for device

Interestingly, the binary file exists and looks fine (as in returns expected output when run with --version). I noticed the error message states a file extension as upper case, but in Total Commander it was in lower case. It shouldn't matter on Windows, unless something is expecting fs to be case-sensitive.

Any ideas what to try next?

@rikvdkleij
Copy link
Owner

Maybe this issue helps #450

@rikvdkleij
Copy link
Owner

Please reopen if still an issue.

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

No branches or pull requests

2 participants