Just a quick update. Have made a decent amount of progress on fixes to the clojure.ps1. Have been able to start a REPL, start rebel.readline via alias, and a couple other things. The big challenge is reconciling the PowerShell token parsing with the arguments clj expects. Have had issues both with what how powershell parses the args that come into the script and using the args that tools.deps outputs to the "<checksum>.main" file. Current workarounds feel a little brittle. Will think more about this (and provide some more specific questions and sample code/patches) as I get through more testing.
this is a problem area with *nix too
what's the scope of the changes needed in the script? happy to take a patch on the windows branch
I temporarily broke the windows stuff into its own repo, purely to make the testing process easier for myself. Can see it here: https://github.com/ajoberstar/ClojureTools Mostly its been a lot of PowerShell syntax issues were things weren't fully translated from bash to PowerShell. There's a couple weird spots (where I've marked TODOs) that have to do some string replacements that I'm not super happy with right now.
Once I get more of the kinks worked out, I'll get this into a better format to submit patches back to the brew-install repo.
cool, thanks for all the work on it
@ajoberstar I don't know PowerShell but I'd be happy to do some testing for you. I'm very keen to see clojure
/`clj` come to Windows but I just don't have the PS chops to contribute.
(right now I'm running the Linux version of clojure
/`clj` on Ubuntu via WSL on Windows 10 but that has some... "limitations", shall we say)
@seancorfield That would be appreciated. The readme on the repo I linked documents how to install it for testing. I think it's usable for basic stuff, but I'm sure there are still plenty of corners that need fixing. Let me know if you find any issues.
'k... let's see how I get on (since I use cmd
not PS when I open a Windows shell)...
PS C:\Users\sean\clojure\cool> Import-Module ClojureTools
Import-Module : The specified module 'ClojureTools' was not loaded because no valid module file was found in any
module directory.
At line:1 char:1
+ Import-Module ClojureTools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (ClojureTools:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
PS C:\Users\sean\clojure\cool>
Based on following the readme...
PS C:\Users\sean\clojure\cool> cd C:\Users\sean\Documents\WindowsPowerShell\Modules\
PS C:\Users\sean\Documents\WindowsPowerShell\Modules> ls
Directory: C:\Users\sean\Documents\WindowsPowerShell\Modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2/27/2019 9:18 PM ClojureTools
PS C:\Users\sean\Documents\WindowsPowerShell\Modules>
@ajoberstar ^^
@seancorfield I'll be able to take a look this evening to see what's wrong about the steps I gave.