bitc / hdevtools

REPO UNMAINTAINED!!! Try this: https://github.com/hdevtools/hdevtools/
MIT License
171 stars 43 forks source link

Ported to Win32 #15

Open mvoidex opened 11 years ago

mvoidex commented 11 years ago

Port is used instead of unix socket name, but it works.

mvoidex commented 11 years ago

This pull request is imported for me, I'm using it in SublimeHaskell plugin for Sublime Text 2/3.

mvoidex commented 11 years ago

@bitc ?

bitc commented 11 years ago

Hi, first of all, thanks for submitting this patch, and I apologize for taking a while to respond.

First of all, Windows support is definitely a great feature to have and I support the effort. I'm just a bit worried about your implementation, mostly regarding using regular port-number based sockets.

I intentionally used unix socket files, placed in the current directory, since it makes it clear that local filepaths are important, and it makes things automatically work with running multiple hdevtools servers at the same time for different projects.

Another thing that slightly bothers me about the patch is the heavy use of preprocessor guards, I generally feel more comfortable trying to minimize their usage (although they are fine when necessary -- hdevtools uses preprocessor guards in several places to support multiple GHC versions)

So for now I'm just going to leave this pull request as is, without merging it. I'm not quite sure what the best way to move forward is regarding windows support. I would be happy to hear some input from the community: if there is a consensus that your approach is the best fit for the windows platform then I would be willing to listen.

In the mean time, this windows branch of yours is still currently up to date with regards to hdevtools master, so those who need windows support now are welcome to use your branch.

Thanks!

mvoidex commented 11 years ago

I don't like this implementation too and I agree with your decision. Thanks for response.

LeDominik commented 11 years ago

Having some win32 API experience from the past the closest you get to a Unix socket on win32 is a named pipe... I have however not yet checked if there's a suitable Haskell-API available on hackage...

Zane-XY commented 10 years ago

I built the Windows fork on my local, and it doesn't work:

hdevtools: connect: failed (Connection refused (WSAECONNREFUSED))

Does the vim-hdevtools still work for Windows? How can I start it from command line?

mvoidex commented 10 years ago

@Zane-XY, have you started hdevtools server?

Zane-XY commented 10 years ago

@mvoidex Thanks for the quick reply, I use it with the vim-hdevtools plugin, I think it will start the server when I open a Haskell file, should I start the server manually? How can I start the server?

mvoidex commented 10 years ago

@Zane-XY sorry, but I don't know anything about vim-hdevtools

Zane-XY commented 10 years ago

@mvoidex when you integrate with sublime, how do you start the server?

mvoidex commented 10 years ago

@Zane-XY Sublime starts it with hdevtools --start-server

ulidtko commented 9 years ago

Hi all. Consider an idea.

Separate branch

@bitc would you like to merge this in as a separate branch? A windows-port along with master would be great, until the integration becomes good enough code-wise.

In my view, it's a concern that the windows port is a tad bit hard to find among the 40 present forks, and it'd be great to see an appropriate branch right in this repo.

Well... I'll make another PR just for this.

ulidtko commented 9 years ago

Well, I couldn't figure out how to offer a brand new branch via PR.

Anyway. My agreement goes to the points that:

Although still, the windows code of @mvoidex is functional and will definitely be useful to some. If not a branch, than at least a link from readme is needed.