I tried installing cljr or windows but I'm getting an error when I run cljr.
Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\Users\Paul Dumais\.clojure\.cpcache\D504A11022EB3B0AD69BDCB04ED9D390.cp'.
File name: 'C:\Users\Paul Dumais\.clojure\.cpcache\D504A11022EB3B0AD69BDCB04ED9D390.cp'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.ReadAllText(String path, Encoding encoding)
at Cljr.Program.Main(String[] args) in C:\work\clojure\clr.core.cli\src\dotnet\Cljr\Program.cs:line 380Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\Users\Paul Dumais\.clojure\.cpcache\D504A11022EB3B0AD69BDCB04ED9D390.cp'.
File name: 'C:\Users\Paul Dumais\.clojure\.cpcache\D504A11022EB3B0AD69BDCB04ED9D390.cp'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.ReadAllText(String path, Encoding encoding)
at Cljr.Program.Main(String[] args) in C:\work\clojure\clr.core.cli\src\dotnet\Cljr\Program.cs:line 380Here are may global dotnet tools:
λ dotnet tool list -g
Package Id Version Commands
------------------------------------------------
clojure.cljr 0.1.0-alpha2 cljr
clojure.main 1.11.0 Clojure.MainI think you'll need to update clojure.main to the last alpha of 1.12.0. There are changes in there required to run clojure.cljr .
No rush, I have other fish to fry.
Ok, I updated both but I still have the same error.
λ dotnet tool list -g
Package Id Version Commands
-------------------------------------------------
clojure.cljr 0.1.0-alpha2 cljr
clojure.main 1.12.0-alpha9 Clojure.Main
I seem to have a bad dotnet install or vcredist. I have those being installed via scoop. When I run the cljr command I get the error above but it also prompts me to open a file called 'Paul' in my C/Users folder which contains the following the snippet I posted above.I deleted the file 'Paul' as suggested here: https://answers.microsoft.com/en-us/windows/forum/all/strange-message-on-startup/e9cb9aba-c871-4e81-892c-cf83de65b89d but now I get:
λ cljr
C:\Users\Paul : The term 'C:\Users\Paul' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ C:\Users\Paul Dumais\.dotnet\tools\.store\clojure.cljr\0.1.0-alpha2\c ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Paul:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionIt looks like some file was supposed to be written as an executable script but the path got truncated at the space in my username.
That's a clue. cljr doesn't write any script files directly, but some reference to your user directory might need escaping in some way. I'll take a look later today and see what I can find. Thanks for all the investigatory work.
Thanks for looking into this. I'm wondering if I should uninstall my scoop-mananged installs just in case it's introducing some path escaping issues.
I'm not familiar with scoop. I'll leave you to contemplate that. I have to step away. I'll take a look when I get back.
I haven't forgotten. Just got buried in ClojureCLR.Next.