Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Windows support #42

Closed
Arcanemagus opened this issue Nov 15, 2017 · 33 comments
Closed

Windows support #42

Arcanemagus opened this issue Nov 15, 2017 · 33 comments

Comments

@Arcanemagus
Copy link

I'm filing this to have a single place to track getting support for Windows here, as I don't see an issue specifically about this already filed.

@wbinnssmith Previously mentioned that there are a "few issues" in #17 (comment) and updated the readme to reflect that it wasn't "fully supported" after #10 (comment).

If there is anything you need help testing please let me know!

@mikecousins
Copy link

What does a few issues mean? I'm currently seeing the outline view and nothing else. Is that what I should be seeing on Windows or are some of you in a more functional state than me?

@Arcanemagus
Copy link
Author

I'm not sure what "a few issues" means, personally it's completely broken as the LSP only responds to the outline view requests, every other part of it returns null.

@HyperBrain
Copy link

For me it means that it is not usable at all in the current state 😞 - I only have the outline, but no errors show up.

@jcowgar
Copy link

jcowgar commented Dec 28, 2017

This makes it unusable for my team as well. Is there something we can do to help? I have not done any Atom development in the past, but would really like to give this a go, but we use Flow, and I'm on Windows.

@sguergachi
Copy link

There's a pull request here that apparently adds Windows support to the flow-language-server but hasn't been merged for over a month...

@hansonw
Copy link
Contributor

hansonw commented Dec 28, 2017

Just published flow-language-server@0.2.4 with @janicduplessis's fixes. 1e93e38 has the version bump so I'd appreciate it if any Windows users here were able to test it out, as I haven't had a chance to do that yet!

@Arcanemagus
Copy link
Author

I'll give it a try 😉.

@Arcanemagus
Copy link
Author

Looks like it's finally working for me! 🎉

image

@jcowgar
Copy link

jcowgar commented Dec 28, 2017

I'm a bit lost. On my system, I simply install flow-bin from npm. What do I have to do to make use of this new commit?

@Arcanemagus
Copy link
Author

@jcowgar The simplest way would be to close all instances of Atom, and then run the following:

apm uninstall ide-flowtype
apm install ide-flowtype

This should make it re-download the dependencies, and since flow-language-server@0.2.4 satisfies the flow-language-server@^0.2.3 requirement of the released version, you should get the latest version installed for you. The 1e93e38 commit simply forces that version as the minimum allowed.

@hansonw
Copy link
Contributor

hansonw commented Dec 28, 2017

Awesome! I'll go ahead and publish a new release to bump everyone's versions.

@jcowgar
Copy link

jcowgar commented Dec 29, 2017

@Arcanemagus Thanks, I didn't realize it was so simple. I followed your instructions and I have flow errors! Didn't think I'd be happy to see them!

So, it's working here!

Thanks @hansonw!

@hansonw
Copy link
Contributor

hansonw commented Dec 29, 2017

Glad to hear, happy holidays! :) Closing this out for now, please let us know if you find any other specific problems on Windows.

@hansonw hansonw closed this as completed Dec 29, 2017
@janicduplessis
Copy link

janicduplessis commented Dec 29, 2017

@hansonw I've been using this for a while now, it's not perfect but usable. The main issue left is caused by vscode-uri because it lowercases drive letters and path comparaisons in atom are case sensitive. I opened an issue on vscode but I'm not sure how likely it is to get fixed upstream. It's not an issue for vs-code because they do other kind of path normalization that lowercases paths on Windows.

@Arcanemagus
Copy link
Author

@janicduplessis There were several changes made to your facebookarchive/flow-language-server#58 PR, maybe those remaining issues you had are fixed there?

@jcowgar
Copy link

jcowgar commented Dec 29, 2017

Current File Only switch does not work. It does not show any results regardless of the current file you are editing. I notice what @janicduplessis mentioned. In the "Path" column of the "Diagnostics" pane, it shows a lowercase drive letter, while hovering over the file tab shows an uppercase drive letter. I am not sure if that is the problem, but seems likely w/the error reported above.

I did upgrade to the version you pushed out in Atom.

@hansonw
Copy link
Contributor

hansonw commented Dec 29, 2017 via email

@janicduplessis
Copy link

@hansonw Yes it's possible, if I remember correctly the issue was that errors did show up in the diagnostics panel, but not underlined in the code because atom would not recognize that it's in the opened file because of different casing on the driver letter.

Also here's the issue I opened on vscode about that for more context microsoft/vscode#40057

@janicduplessis
Copy link

janicduplessis commented Dec 29, 2017

@hansonw Did a quick investigation and the problem happens here https://github.com/flowtype/flow-language-server/blob/master/src/Diagnostics.js#L78 when we create the URI. We could use https://github.com/flowtype/flow-language-server/blob/master/src/utils/util.js#L40 and patch it for windows but creating a uri object is more complex (It seems like we use only toString() so we could juste change the util method to return a string instead of the full uri object).

Another alternative that might be better is to fork or vendor in vscode-uri and remove the code that lower cases driver letters.

@hansonw
Copy link
Contributor

hansonw commented Dec 31, 2017

Thanks again, @janicduplessis! I've pushed a new flow-language-server version and ide-flowtype version so hopefully this should be fixed now.

@jcowgar
Copy link

jcowgar commented Jan 1, 2018

@hansonw @janicduplessis "Current File Only" now works on Windows!

@sguergachi
Copy link

I'm still seeing this problem on Windows, when I open a file I see this. Tried re-installing the package and it didn't help.
image

@Arcanemagus
Copy link
Author

Arcanemagus commented Jan 2, 2018

@sguergachi That's a separate issue (the outline was actually the only thing that did work on Windows!), there are a few issues already filed here about this but unfortunately I don't remember the solution off the top of my head.

@thirafidide
Copy link

I still can't make it work. I tried to reinstall everything (even the Atom itself) and still got no flow error message, nor autocomplete, hints, etc. The Outline working just fine though

notworking

Did i missing something? Also i don't get any message in the console (from Ctrl+Shift+I), probably the ide didn't fire properly?

@Arcanemagus
Copy link
Author

@iamN00B The debug messages shown above are a hidden setting, if you want to enable them you need to type atom.config.set('core.debugLSP', true) in the console.

Does flow work in the CLI for you? (npx flow check)

@thirafidide
Copy link

thirafidide commented Feb 2, 2018

CLI runs fine and shows the error.

Some errors do show up though after i enabled atom.config.set('core.debugLSP', true)

error

@hansonw
Copy link
Contributor

hansonw commented Feb 2, 2018 via email

@Arcanemagus
Copy link
Author

Looks like that's already enabled, and their node_modules flow-bin is crashing with a code of 12. Since this is something different from basic Windows support I'd file that as a new issue @iamN00B.

@thirafidide
Copy link

@Arcanemagus @hansonw yep, it's enabled. Disable it doesn't help though.

I see, i'll file this as a separate issue. thanks

@sguergachi
Copy link

Seeing the same issue, (no diagnostics) though I don't see an error with code 12:
image

@Arcanemagus
Copy link
Author

@sguergachi Your screenshot shows diagnostics being pushed back for two files, so your problem is in the interface somewhere.

@sguergachi
Copy link

@Arcanemagus Interface meaning ide-flowtype package or atom-ide package?

@Arcanemagus
Copy link
Author

atom-ide-ui's diagnostics, or linter + linter-ui-default, whichever you are using to display those messages.

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

No branches or pull requests

8 participants