Open bradennapier opened 7 years ago
hey @bradennapier,
Happy you're excited about the package :) I know we are too.
Could you provide a bit more context, like your OS and its version, and your Atom version?
Can you confirm running flow
from the command line in your project produces valid results?
Thanks!
Yes, and nuclide works for the most part minus some really annoying bugs that ive reported recently there.
I am on the latest atom version on osx
Atom: 1.19.2
Flow appears to work fine.
Hi,
can't get it working as well, no Flow error showing while present on the flow cli. Nothing in the "outline view".
Atom 1.19.5 Ubuntu 16.04 LTS Flow: 0.52 (in local node_modules)
I disabled all "linter" packages I had (very sad BTW).
Also the fact that I have to disable all my linter
linter-*
packages is leaving me very confused.
Hope we could manage to make them work together.
Anything in the console? @pascalduez
Note that atom-ide-ui
is a drop-in replacement for linter
, so you can continue to use all the linter-*
packages (It's just that also having linter
means you'll have 2 linting UIs.)
Gave it another try, nothing interesting in the console.
Some linter errors (ESLint) shows up in the diagnostic panel though, but no Flow.
Also busy-signal
seems bypassed.
Edit: I thought I had the same issue with the flow stuff not working, but the issue seemed to be coming from #13 which mentions that it is necessary for the .flowconfig
to be in the root project folder.
So on the announcement I tried all this again and it all still fails ... nothing works and no error what-so-ever. .flowconfig is in my project directory so that isnt it... ???
Oh... welll this whole thing is 100% useless
If you it can't support es6 then I don't see any point in this... not sure why nuclide does and this does not?
Update:
Upon adding flowtype-ide back in (just uninstalled EVERYTHING to try to make this work...)
now it says
No errors
Atom version 1.21.0 beta0
@bradennapier Is your .flowconfig
in the root project folder that you have open in Atom? That was my issue. Your example works for me:
Same thing as @bradennapier. @saadq, double-checked, but .flowconfig is in root folder.
test repository: https://github.com/JustasPolis/flow-test
Environment:
Can confirm running npm run flow catches type errors, on hover I get type definitions, but no type errors in IDE (disabled previously installed linter as requested in diagnostics).
I deleted node_modules, unchecked using flow bin from node_modules and it seems to have fixed some things... some other issues currently remain tha I am trying to figure out... flow is not working in most of my files still
(I also essentially removed every single package I had which is obviously not going to work longer term since many of them are crucial)
@bradennapier I had weird errors like that too, but you can check "Current file only" and they shouldn't show up :-)
Yeah but they are there in those files :-P
Ugh - broke again when they just updated to 0.31 of atom-ide-ui -- no errors yet again... yay
You are working in the app/shared/processes/... file?
No, but if i open that folder then those files have flow errors as shown so the issue remains. I can not look at the errors and they will be gone, sure but that doesnt do much good :-P
Now it is semi-working... it shows the types but gives me no errors at all
Do you have a dummy project or something that you could possibly upload to GitHub? Might be easier to see if someone could help debug
Something insanely weird def going on... i get it working then it fails then it crashes then it doesnt work -- restarting over and over and over fixes it for a few minutes.
Finally saw errors this time in the console...
Uncaught (in promise) Error: Emitter has been disposed
at Emitter.module.exports.Emitter.on (/private/var/folders/w9/9j_nzh255d1cd0l17hm_y_c40000gn/T/AppTranslocation/CF40807D-F9DF-4B48-8D8C-6C1569B2BC47/d/Atom Beta.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:77:21)
at IndieDelegate.onDidDestroy (/Users/bradennapier/.atom/packages/linter/lib/indie-delegate.js:75:25)
at LinterPushV2Adapter.attach (/Users/bradennapier/.atom/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/adapters/linter-push-v2-adapter.js:35:11)
at FlowLanguageClient.startExclusiveAdapters (/Users/bradennapier/.atom/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/auto-languageclient.js:236:27)
at /Users/bradennapier/.atom/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/auto-languageclient.js:192:14
at Generator.next (<anonymous>)
I will get a repo out after i try a few more things...
@saadq
example: https://github.com/JustasPolis/flow-test
No type errors in IDE, npm run flow shows errors :).
Oh wow yeah.. upon running flow from command line, it is finding hundreds and hundreds of things that I am not warned about at all in the IDE.
Hmm, sorry never mind I don't think I can help I don't know why it's working for me and not you :/
Your OS is mac/linux ?
Yeah, I'm on macOS Sierra with Atom 1.20.0.
gotcha, probably it's windows related.
My issue was on OSX so i think it has something to do with Flow crashing and/or not working right without errors in various situations. I am running into a LOT of problems like this where I have to restart atom to get it working again - it seems like it still works but locks up and returns the same results every change.
Let's try to clear a point: is this supposed to work for Atom versions < 1.21 ?
http://blog.atom.io/2017/09/12/announcing-atom-ide.html
We strongly recommended you use Atom Beta 1.21
Mmwell https://github.com/flowtype/ide-flowtype/blob/master/package.json#L14
It has been around for awhile. I originally had installed it a few weeks ago, so yes it should work. However, according to the Atom blog post, the full quote is as follows
We strongly recommended you use Atom Beta 1.21 as it includes the necessary file monitoring and process control to ensure the underlying language servers are running properly.
So sounds like some fixes on Atom's side to make it ready for a public announcement were included in 1.21 but it is not dependent on it.
It's also happening with Atom Beta 1.21-beta0, Ubuntu 17.04. No global installation of Flow, default configuration I am using.
I'm also having this problem where flow errors do not show up in diagnostics.
os: macOS Sierra 10.12.5 atom: 1.21.0-beta0 ide-flowtype: 0.17.0
I turned on debug and tailed the flow-language-server.log and got:
@bradennapier @pascalduez This should only work for Atom v1.21.0-beta0 and up, atom-ide-ui
was recently changed to take advantage of several features that are only available in that version of Atom that allowed several bugs to be fixed related to watching files.
@Arcanemagus yes, as stated a couple comments up... adn it actually DID work before this it just had lots of issues and crashes
@Arcanemagus ide-flowtype
is supported in earlier versions of Atom. Flow has its own file watcher that doesn't rely on LSP's file watching service. I think there's an issue with null diagnostics that we're going to fix.
@bradennapier You said it should work in earlier versions, but as far as I know it was just recently changed to require Atom v1.21.0-beta0.
@hansonw Ah, good to know.
As an additional point of data, this plugin is only working for Outline views for me, all other services are completely failing to work so hopefully this "null diagnostics" issue fixes that 😉.
I just merged @hansonw's changes and published a corresponding version of ide-flowtype
. Let us know if this addresses your issues!
Cool with let you know! No issues thus far!
How would I enable debug mode to get more information? It's still not working for me unfortunately.
os: Windows 10 x64 atom-ide-ui: 0.3.1 ide-flowtype: 0.17.4
@Arcanemagus run atom.config.set('core.debugLSP', true)
. Also check the contents of the flow-language-server.log
(found in os.tmpdir()
, not sure where that is on Windows)
It looks like it's unable to communicate with any of the flow
versions except possibly the built in one (there is a local one in this project and I have a global version installed):
Interestingly the textDocument/documentSymbol
seems to be working just fine.
Seems to basically be saying the same thing as the Atom log: It's receiving empty responses from flow
:
2017-09-13 16:27:06.310 WARN (pid:87424) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter\lib\main.js. JSON:
''.
Note that the local flow
works just fine in the CLI:
PS C:\Users\Landon Abney\Documents\GitHub\linter> npx flow check
C:\Users\Landon Abney\Documents\GitHub\linter\node_modules\flow-bin\cli.js
Error: lib/main.js:28
28: Math.pow(2, 'foo')
^^^^^ string. This type is incompatible with the expected param type of
185: pow(x: number, y: number): number;
^^^^^^ number. See lib: C:\Users\LANDON~1\AppData\Local\Temp\flow\flowlib_2a8adef7\core.js:185
Found 1 error
The latest version has resolved this issue for me. Flow errors are now showing in diagnostics! 👍
Yeah, same here! Everything working fine! :D
In apparently the opposite to everyone else, the latest version seems to have broken this for me :( I am on the latest versions of atom-ide and ide-flowtype. I have type hinting working (hovering over a typed variable tells me its type), and the outline view works correctly, but errors are not being shown in diagnostics. Here you can see errors from flow-check
but the diagnostics is empty:
The developer console does not show me any errors.
@jackfranklin You can try enabling diagnostics as outlined by @hansonw here.
@Arcanemagus so I'm not sure what happened, but I disabled "Use local flow-bin from node_modules" and it started working after a restart.
I then restarted, enabled "Use local flow-bin", restarted and it's still working. I'm not sure what is going on there, however it's all good for me now. Having read that ide-flowtype will automatically download versions of Flow for me I'll be unticking that option going forward.
If it happens again I will enable debug mode and try to provide more information.
@jackfranklin i saw similar results. Nothing worked for me until I unchecked the local bin one (which has the latest flow)
I would also point out that there is nothing in the folder it says they will be stored at ... so I believe that whole concept does not work right now and its just using my globally installed flow that i installed recently
Has anyone got this working under Windows? I'm seeing exactly the same issue as @Arcanemagus mentioned above
Unchecking "Use flow-bin
from node_modules
when available" causes most of the logged errors to go away... but that's only because nothing ever actually comes back from the server other than this rarely:
JavaScript (Flow) rpc.onNotification window/logMessage
{
"message": "[2017-09-15 08:49:45.619] [WARN] nuclide-flow-rpc - Invalid JSON result from flow status --json c:\\Users\\Landon Abney\\Documents\\GitHub\\linter-jshint\\lib\\main.js. JSON:
''.",
"type": 4
}
Which seems to indicate it's still getting back blank responses.
Not sure what's up but I can't really tell if this is working. Dont have any instructions other than to install the one package so I would imagine it should be fine.
Anyway, looks like exciting stuff!
The Issue
Outline view is completely empty - no provider provided
Not Getting Type Hints
Type hints also do not seem to work. I do not currently see anything at all in terms of hints like shown in the screenshot.
Not Getting Autocomplete
It would appear that autocomplete does not do anything or show up at all?
Go To Definition?
I dont think this works either