leiningen
leiningen copied to clipboard
lein.bat trampoline is constrained by command-line string limitation
I got "The input line is too long." on windows.
See: http://support.microsoft.com/kb/830473
What was the line you were trying to use? Windows XP? Looks like this should occur only on older systems.
It's XP, in my case. On the page, it says it APPLIES TO Microsoft Windows Server 2003, Datacenter Edition (32-bit x86) Microsoft Windows Server 2003, Enterprise Edition (32-bit x86) Microsoft Windows Server 2003, Standard Edition (32-bit x86) Microsoft Windows Server 2003, Web Edition Microsoft Windows XP Home Edition Microsoft Windows XP Professional Microsoft Windows 2000 Advanced Server Microsoft Windows 2000 Professional Edition Microsoft Windows 2000 Server Microsoft Windows NT Server 4.0 Standard Edition Microsoft Windows NT Workstation 4.0 Developer Edition
What was the line that caused "The input line is too long"? The sample may help others think how to break it down into smaller chunks.
It happened right after copying resource files using lein-resource plugin. Here is the project file: https://gist.github.com/yuanmai/4713058
I'm not sure how far we should go when it comes to backward compatibility. In addition, someone's working on a PowerShell implementation of the bat file, which will likely fix this issue.
The trampoline handling in lein.bat
was rewritten, so this is probably fixed. If it's still an issue we can reopen it.
This is still an issue on windows, because with 'call' the part that is longer then 8191 chars will silently get dropped instead of an 'input line is too long'.
With some manual hackery, trampolining with Powershell seems to be a solution. I am not sure about backwards compatibillity, but Leiningen already has a dependency on Powershell for installation, so is it ok to convert it?
Does https://github.com/technomancy/grenchman work with trampoline on Windows?
@ekroon: IIRC @technomancy has said that converting the lein.bat
to Powershell is a goal, so feel free to work on an implementation if that's what you asked. :)
@kumarshantanu I am not completely sure about the Grenchman hint, but there isn't a binary for Windows available.
@hyPiRion that is my question indeed :smile:
Grenchman uses libraries that haven't been ported to Windows.
Porting to Powershell would be fine; happy to take a patch for that.
Just noting I'm almost positive that this issue appeared for me with figwheel like this and this.
I think this because I can see a file lein-trampoline-33.bat
was left in my tmp dir and the dependency which I'm failing to resolve occurs at position ~8192 in the command line. So it appears that lein figwheel does not work on Windows once you reach a certain number of dependencies.
I'm almost entirely unfamiliar with leiningen but perhaps this could be worked around by creating one directory in %TEMP%
and filling it with symlinks to each .jar file then passing that directory as -cp
. I might experiment with this though I'm a bit short on time at the moment.