Page MenuHomePhabricator

[Flow202][keyserver][skip-ci] [20/x] Add any-casts for invalid validator tests
ClosedPublic

Authored by ashoat on Nov 13 2023, 3:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 11:58 PM
Unknown Object (File)
Sun, Dec 15, 11:58 PM
Unknown Object (File)
Sun, Dec 15, 11:57 PM
Unknown Object (File)
Sun, Dec 15, 11:49 PM
Unknown Object (File)
Sun, Dec 15, 10:15 AM
Unknown Object (File)
Sun, Dec 15, 4:05 AM
Unknown Object (File)
Mon, Dec 9, 5:26 AM
Unknown Object (File)
Thu, Dec 5, 8:56 PM
Subscribers

Details

Summary

These invalid validator tests are supposed to fail. I suppose I could type the invalid validation shapes so that Flow doesn't see any issues (eg. string | number), but it seems kind of silly. Instead, I decided to just mark the types as any... just as the validator should detect an issue during runtime, it's probably a good thing that Flow detects an issue during static analysis.

NOTE: CI will fail on this diff. I considered the possibility of fixing Flow errors BEFORE upgrading Flow, but it wasn't possible... in some cases, the fixes to support the new version of Flow caused errors in the old version. I could have hidden these type errors with $FlowFixMe lines and then later revert those, but that seemed like too much busy work.

Depends on D9868

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 13 2023, 3:38 PM
Harbormaster failed remote builds in B24086: Diff 33185!

Alternatively we could use //$FlowExpectedError, but doesn't really matter

This revision is now accepted and ready to land.Nov 14 2023, 7:34 AM
ashoat retitled this revision from [Flow202][keyserver] [20/x] Add any-casts for invalid validator tests to [Flow202][keyserver][skip-ci] [20/x] Add any-casts for invalid validator tests.Nov 19 2023, 5:09 PM
This revision was landed with ongoing or failed builds.Nov 27 2023, 3:27 PM
This revision was automatically updated to reflect the committed changes.