Code Monkey home page Code Monkey logo

Comments (8)

mikavilpas avatar mikavilpas commented on June 16, 2024

Best guess: the file is too long. Perhaps Windows limits the length
of parameters to curl, which is sending the request.

Might be able to work around this with echo and piping (if possible on
Windows). If that doesn't work, write the contents to a file and make
curl read that somehow.

from omnisharp-emacs.

mikavilpas avatar mikavilpas commented on June 16, 2024

Occurred on files at 1173 lines and one about 800 LOC so far.
Truncating the file to a lower treshold seems to work around the
issue.

from omnisharp-emacs.

mikavilpas avatar mikavilpas commented on June 16, 2024

A quick search led me to this:
http://stackoverflow.com/questions/3205027/maximum-length-of-command-line-string

It states there indeed is a character limit in command line statements.

from omnisharp-emacs.

mikavilpas avatar mikavilpas commented on June 16, 2024

There seem to be viable alternatives built in curl:

http://stackoverflow.com/questions/3007253/send-post-xml-file-using-curl-command-line
http://stackoverflow.com/questions/6408904/how-to-send-post-request-with-data-specified-in-file-via-curl

I'm thinking, on Windows systems we could default to using that
switch to send a temporary file contents (the current buffer contents).

Note that the current buffer contents != current file contents as the
editor commonly contains changed data vs. the actual file.

from omnisharp-emacs.

bbbscarter avatar bbbscarter commented on June 16, 2024

Oh lord, yes - sorry, only just seen this issue. Command line limits on Windows are a pain. A couple of suggestions:

  1. Always send your Win7 curl commands via a temp file. It's usually not much slower than using a command line anyway as the file is most likely cached in memory, and it keeps things simple and consistent.
  2. Switch to using the emacs url library. I'm guessing you've already looked into this and rejected it for a good reason. :)

from omnisharp-emacs.

mikavilpas avatar mikavilpas commented on June 16, 2024

Point 1 is probably the route I'll take, yes. I had the idea of using
some kinds of temporary files but don't really know much about
the possibilities of them on Windows yet.

About point 2: I tried many different options in the beginning. You
might still be able to find them early in the commit history. All of
them had some problems. Some just hung randomly, and after
a lot of pain I just got fed up and switched to curl. :/

from omnisharp-emacs.

mikavilpas avatar mikavilpas commented on June 16, 2024

Just implemented a fix for this. Works very well. No noticeable
slowdown, even! :)

Looks like this is usable on Windows again.
Will push fix to master later on.

from omnisharp-emacs.

mikavilpas avatar mikavilpas commented on June 16, 2024

Merged to master: 32c8ec5

from omnisharp-emacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.