flow-ide icon indicating copy to clipboard operation
flow-ide copied to clipboard

Flow-IDE running on files that aren't flow typed

Open eranimo opened this issue 7 years ago • 4 comments

Why does Flow-IDE run on files that aren't flow typed? It's a huge waste.

eranimo avatar Jun 05 '17 18:06 eranimo

Flow IDE does not run on non-flow files, it only tries to autocomplete, and that too only if a .flowconfig exists.

If this is not the behavior you're saying, please let us know

steelbrain avatar Jun 05 '17 18:06 steelbrain

What's the point in autocompleting in a file that isn't flow typed? Is there a way to turn that off? I have a 5000 line file that doesn't have any flow typings. It takes ~3 seconds to run Flow-IDE every time I save.

eranimo avatar Jun 05 '17 18:06 eranimo

It's a feature that doesn't slow down your pc or anything and is near-instant. I don't see why you would want to disable it.

If it does not have flow pragma, it should not run flow on it at all. Regardless of the lines in the file, even if it does run it should be near-instant. (unless the file is a base types file and it's types are used in other files).

Can you create a minimal piece of code that reproduces the behavior? That would help a lot

steelbrain avatar Jun 05 '17 19:06 steelbrain

I'm seeing Flow IDE Coverage warnings on non-Flow files in a Flow project (i.e. .flowconfig exists, but some files do not have the @flow pragma). Is this expected behavior?

Weirdly enough, other things like type on hover are also happening in the non-flow files, but only on certain things. For example, I'm not seeing type annotations on normal variables, but I am seeing them on JSX components. Happy to follow up with more details, but as for the basics:

  • macOS v10.12.6
  • atom v1.23.0
  • atom-ide-ui v0.7.0
  • flow-ide v1.9.0
  • Non-flow files are unit tests for Jest

mcous avatar Dec 13 '17 18:12 mcous