Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lein.bat trampoline is constrained by command-line string limitation #982

Open
yuanmai opened this issue Feb 5, 2013 · 12 comments
Open
Labels

Comments

@yuanmai
Copy link

yuanmai commented Feb 5, 2013

I got "The input line is too long." on windows.

See: http://support.microsoft.com/kb/830473

@kumarshantanu
Copy link
Collaborator

What was the line you were trying to use? Windows XP? Looks like this should occur only on older systems.

@yuanmai
Copy link
Author

yuanmai commented Feb 5, 2013

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

@kumarshantanu
Copy link
Collaborator

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.

@yuanmai
Copy link
Author

yuanmai commented Feb 5, 2013

It happened right after copying resource files using lein-resource plugin.
Here is the project file:
https://gist.github.com/yuanmai/4713058

@hypirion
Copy link
Collaborator

hypirion commented Feb 5, 2013

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.

@technomancy
Copy link
Owner

The trampoline handling in lein.bat was rewritten, so this is probably fixed. If it's still an issue we can reopen it.

@ekroon
Copy link

ekroon commented Jan 10, 2014

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?

@kumarshantanu
Copy link
Collaborator

Does https://github.com/technomancy/grenchman work with trampoline on Windows?

@hypirion
Copy link
Collaborator

@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. :)

@hypirion hypirion reopened this Jan 10, 2014
@ekroon
Copy link

ekroon commented Jan 10, 2014

@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 😄

@technomancy
Copy link
Owner

Grenchman uses libraries that haven't been ported to Windows.

Porting to Powershell would be fine; happy to take a patch for that.

@alexnixon
Copy link

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.

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

No branches or pull requests

6 participants