-
Notifications
You must be signed in to change notification settings - Fork 710
Omit deriving Generic on LicenseId #5893
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
Comments
I believe it should be fine to apply this change to |
Sorry, I meant 8.6.3 - the latest released one 🤦♂️ |
OK, let's do it. |
Hmm, actually, it's going to change the Binary instance for LicenseId, so things saved with the old won't still work. Is that an issue? |
It should be fine, since we don't support reading local build infos generated by old Cabal versions (you get a message telling you to re-run |
I'm strongly against this, as this would mean that we'd end up with orphan instances somewhere, cause |
I don't understand the argument about orphan instances. |
I think Herbert is suggesting that consumers of |
OK, makes sense. |
For reference: Neil's post about the problem; GHC ticket. |
Since there are strong objections, I'm closing this as wontfix. |
Recent reinkarnations in: |
Compiling the LicenseId file on my Windows GHC 6.8.3 takes ~30s (measured while running Hadrian). Experimenting with a cut down version, it turned out that most of the time was due to the Generic derivation on LicenseId. That generic derivation is used to provide a Binary instance, but can be replaced trivially by:
In my measurements this reduces the compilation time significantly, from 9s to 3s at
-O0
and 22s to 8s on my cutdown file. That seems a worthwhile speedup.Given this is an exported type, it's technically a user visible API change, hence raising a bug rather than a PR.
The text was updated successfully, but these errors were encountered: