Skip to content
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

More checks in version range parser #6586

Merged
merged 2 commits into from
Mar 16, 2020

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Mar 16, 2020

No description provided.

@phadej phadej force-pushed the more-checks-in-version-range-parser branch 2 times, most recently from e67f193 to ef0699a Compare March 16, 2020 15:34
phadej added 2 commits March 16, 2020 20:39
- remove parallel code, it's complicated and doesn't speedup reliably
- count files with warning
- add --keep-going
- add `clock` measurement from inside the parsec test
Do this already in the Parsec instance parser.
This allows removing checks from `D.PD.Check`.
Later this would also allow removing non-relevant
constructors from `VersionRange`, allowing easier testing.

This change causes 10% slowdown: from

```
135768 files processed
  7350 files contained warnings
113156 files have check warnings
     0 files failed to parse

120.901201s elapsed
117.640431s elapsed
119.663620s elapsed
119.454329s elapsed
119.785214s elapsed
```

to

```
135768 files processed
 31912 files contained warnings
113109 files have check warnings
     0 files failed to parse

130.969593s elapsed
132.016403s elapsed
134.214536s elapsed
128.753382s elapsed
131.503804s elapsed
```

I hope the slowdown is acceptable, and I have an idea which may mitigate
this. I'll try out it after I done further refactorings.

Note how (parser) warnings grew by a factor. There are plenty of (old)
files on Hackage, which don't use correct cabal-version.  For that
reason we only issue warnings, and not fail.  Quirks approach won't
scale for these. In comparison, there are even more files
with check warnings
@phadej phadej force-pushed the more-checks-in-version-range-parser branch from ef0699a to 2afbd0e Compare March 16, 2020 18:39
@phadej phadej merged commit e9b0a71 into haskell:master Mar 16, 2020
@phadej phadej deleted the more-checks-in-version-range-parser branch March 16, 2020 20:01
@phadej phadej added this to the 3.4.0.0-rc1 milestone Jul 10, 2020
@phadej phadej mentioned this pull request Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant