-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues which block usage of the tool #7426
Comments
I appreciate the feedback, and I think this is a good list of high priority work for the community. I spent some time today looking into #7185, and I just left a comment there. I also left a clarifying question on #5183. I'll spend some more time looking into the problems mentioned here on Monday. I have one question associated with your bullet point that's not associated with an issue.
I'm not intimately familiar with this code, but the |
@nmote There is full detail here: #7431 This is odd because when I do the following:
I see this message slowly counting up to 200K files.
The server takes longer to start. So either untyped is broken, or the parsed files message is broken. If the parsed files message is broken, then the slow down must come from reading 200K files instead of 3000. This is assuming that when I ignore
|
So it seems that it is always scanning all files, even in node_modules. This is another huge startup performance issue. Seems like there is no way to not touch node_modules. In node,
|
I personally think you may be holding onto issues long solved since around 0.6x.
—- I have not run into noticeable peformance issues with this method since the node module resolution was greatly improved. I believe they used to parse ALL files in node modules whereas now they build their own dependency tree and traverse that, relying on flow-typed if no .flow.js option exists. For me untyped would be to have flow “ignore” some internal part of a repo which is problematic when trying to build a flow project, likely exclusively for projects in process of migration to Flow. Of course I’ve never used the feature so I may be wrong in my understanding. |
I’d also take this time to also mention that type script is similar. It will always say cannot find module unless you install the required types stub, granted they have a massive library. Flow typed is pretty solid and it’s honestly very easy to convert (some tools to do it automatically do exist). I’d recommend you install and stub out your modules using the flow typed package which will fix your issues by default. —- My company is toying with type script and while I have enjoyed it a bit, one thing I’d mention immediately as the difference is that type scripts method of type safety is far more “surface level”. It doesn’t feel like it gets to the logical errors in how you’re doing things on a deep level like flow does. Flow feels like it’s actually trying to understand “why” you’re doing something vs typescript just kind of being a one level “yeah this checks out” thing. With flow I wrote a pretty large scale application with 100% coverage and it worked the first time. I had almost zero errors to fix. TS ... well ... not the case. You just can’t make it strict enough.
I will say Typescripts developer experience trumps flows 100 times over though. It’s rock solid... Ok rant over - my bad :) tangents are my specialty |
I have 200K total files in a monorepo. With Flow, the server takes >1min to start. The server needs to be restarted after every code config change. With TS, I simply add a
In a monorepo this is painful. Each package can require its own version of a dependency. If I have 1000s of dependencies, flow-typed will be very slow. The advantage of Flow is that you can just add a comment to top of file and start adding types. But it is just so much slower than TS.
Nope. Just tried it. It reports if the package is missing, but does not complain about missing types.
I used to do this. It took heaps of time, and to get it to work with a monorepo was tedious. And still, without support for using a TS setup was extremely easy, its orders of magnitude faster, and supports config files per package, module aliasing, and monorepos with their project references feature.
For me, I simply cannot get it to run on my codebase, hence the issue.
You should try flow-runtime. Compile-time and runtime type checking is really great.
Yep, why I chose it in the first place.
You can use Babel with TS. Flow is better at supporting new lang features though if that's what you meant.
I always preferred Flow, but the DX is terrible and I could never get it to work on my monorepos. When I read through the Typescript docs, it just seems so much more flexible in terms of configuration, to support modern JS - like config's per package, project references for monorepos, and module alias support. A ton of time has gone into the DX work, whereas Flow has ignored this. |
IMHO a huge issue which may motivate migration to TS for users is the fact that it's easier to work with library definitions (e.g. more 3rd party libs have definitions, and DefinitelyTyped ecosystem/website seem more user-friendly). Apologies if that's off topic for this issue on Flow's repo, but additional support on these two repos/projects could be helpful (IMHO): |
I want to collect a list of issues that prevent Flow being able to be actually used for a code base.
This is mainly missing config options, or performance issues related to missing config options. This list is just for basic stuff. Other issues like community, tooling, etc. are things that can improve over time, but if Flow cannot be run on your codebase, then there is not choice but to move to TypeScript.
module_alias
resolution capabilities #7185node_modules
when using[untyped]
#7431 Don't typecheck or load files under node_modules/ unless they're imported by flow-typed files #869[untyped]
still makes the server look for them on startup which makes server start needlessly slow (which you have to deal with on every config change). I want to ignore allnode_modules
, but haveimport 'foo/bar'
work. This is not possible.Comment and I can update the list so we have a prioritized list of community issues that are preventing usage of the tool. As long as we can use it on our code bases in the first place, then we would be happy to wait for other issues to be fixed.
Maybe having a tag called "blocks community usage" would be good to label issues that fit this description.
The text was updated successfully, but these errors were encountered: