-
Notifications
You must be signed in to change notification settings - Fork 701
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
Refactor to avoid incomplete record selection warning #10402
Comments
What version is |
Per SPJ suggection. Closes: haskell#10402
Per SPJ suggection. Closes: haskell#10402
This change is a temporary fix, until haskell/cabal#10402 is addressed
Thanks! I don't know about branches... maybe @mpickering can help. |
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402
My understanding according to the release timelines on #10193 is that there will be 3.16 cut from the master branch before the 9.12 release so no backports to 3.14 branch will be needed. |
It seems that in #10193 the consensus is now there will not be a 3.16 release before ghc-9.12. Sorry for that misunderstanding, I was going by what was written in the ticket. However, the patch in question which requires this change will not be in 9.12, so there is no need to hurry a backport. |
Per SPJ suggection. Closes: haskell#10402
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: haskell/cabal#10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf
Per SPJ suggection. Closes: haskell#10402
When I compile cabal with
-Wincomplete-record-selectors
I get this:Now, it's true the the record selector
componentExposedModules
cannot fail when applied toclbi
, but the reasoning for that is very indirect: it means understanding thatLibComponentLocalBuildInfo{} <- [clbi]
guarantees thatclbi
is definitely built withLibComponentLocalBuildInfo
, which itself involves knowlege of how list comprehensions work, and singleton lists. This far beyond what the incomplete-record-selector warning mechanisms can do.Suggestion: the code would be more perspicuous and robust if we said
Now no warning! And it's a fully backward-compatible change.
How did this arise?
It turns out that GHC proposal 516 Incomplete record selectors said that
-Wincomplete-record-selectors
should be in-Wall
, but due to an error it was omitted. When I add it to-Wall
, to make GHC follow the proposal, GHC's build system falls over when compiling Cabal because it uses-Werror
.For now, we've agreed that I'll add
-Wno-incomplete-record-selectors
to GHC's build system for Cabal. But if the Cabal authors adopt the above change, we can stop suppressing those warnnings. Thank you!The text was updated successfully, but these errors were encountered: