-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Re-enable type checking #8217
Re-enable type checking #8217
Conversation
Looks like path types are broken again in the current version of Closure Compiler (see 2b1d897). Given the fact that this seems to change with every release, I don't feel right now like the decision to continue using Closure Compiler for type checking was right. |
c1c9c77 deactivates extra checks made the NTI. With this the error count goes from 1238 to 387 |
@fredj Will you be able to continue working on this? |
@ahocevar I'm not sure it's worthwhile to continue to enable the New Type Inference checks. What about changing the Closure Compiler configuration to have the same checks as the 4.x branch? |
Sounds good to me. |
4506acc
to
ceaeb06
Compare
@ahocevar / @fredj: Is the long-term plan for OpenLayers 5.x to continue using the Closure Compiler for type checking? I'm looking into necessary steps for migrating a fairly large project (OpenSphere) to ES6 and OL 5.x, while continuing to use the Closure Compiler for type checks and advanced optimizations. This seems like it should work if we use |
Obviously v20180506.0.0 has broken path type support, whereas path types in v20180402.0.0 work fine (> 2000 warnings vs. ~ 1200 errors).
This is not a blocker for the 5.0.0 release. If it's not finished by the time we cut the release, we'll publish 5.0.0 without type checking. After the release, we can experiment with typescript JSDoc annotations (see microsoft/TypeScript#5158 and e.g. webpack/webpack#7031) to replace the JSDoc/Closure type annotations we currently use. If that turns out to work, we'll be able to use better tooling for the library, and Closure compilers users should still have a way to automatically transform these annotations to ones that Closure compiler understands -- similar to what https://npmjs.com/package/babel-transform-jsdoc-closure currently does. |
ok, removing the 5.0.0 milestone |
closure compiler will not be used to do the type-checking. closing |
Looks like the recent Closure Compiler update changed things so type checking the way we want it now requires
compilation_level: 'ADVANCED'
.With this change, we're back at >2000 warnings.
@fredj, maybe you want to take a look at those? I've pushed this branch to openlayers if you want to add commits.