Repository navigation
handle build reports in v2-build - #7567
Merged
Merged
Conversation
Member
|
I'm all for removing |
Mikolaj
approved these changes
Aug 23, 2021
Collaborator
Author
|
The standard buildreport code is from here in v1, but I inlined the report generation since the types changed enough I couldn't make use of the existing functions: The planning failure code is from here: Let's get this merged, then I'll make another PR cleaning up remote build reporting (removing it from v1 as well as removing the useless flags from v2) |
Member
|
We need one more review, pretty please. :) |
emilypi
approved these changes
Sep 11, 2021
jneira
force-pushed
the
gb/build-reports-v2
branch
from
September 11, 2021 19:16
da7be57 to
b7efcf9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #6851 -- or rather resolves it enough for the purposes of hackage builder, which is likely the only thing that ever cared about these flags.
In particular makes the
--report-planning-failureand--build-summaryflags do anything at all. Note that this preserves the v1 behavior that by default, build-summary information for all builds gets written to ~/.cabal/logs/build.log (which had been lost with v2-build before). The former flag writes build-summary info even if the solver fails (otherwise such info is written only if a build occurs). The latter controls where to write summary info to.Some notes on what this doesn't do:
This does not provide the still missing "remote build reports" (enabled by
--remote-build-reporting) since hackage builder doesn't use them, and nobody else seems to use or miss them either. At this point I think we should probably remove the flag from v2 and just strip the functionality entirely (saving code) when v1 is removed (if not sooner). For background context, the idea of anonymous/remote build reports was that instead of a central docbuilder, cabals could be taught to tarball up all the information from their builds so they could automatically upload it and "report to a central server" any successes or failures, optionally with logs, etc. It was an interesting idea, but never fully implemented. The existing machinery is not very fleshed out on the tricky bits (i.e. actually uploading the reports, controlling policy well, etc.) and there was never a clear policy worked out nor any upstream support. As such, I think we can strip out the code for this from the codebase and if we embark on this in the future, start fresh with a clear architecture and design first, and then write new code to suit that.Further, this does not write detailed logs for
--report-planning-failurebut rather just the summary log. It seemed an extra bit of unnecessary functionality, given that hackage builder doesn't use these logs, and as far as I can tell nobody else did, who might miss them. This means that as far as I can see, the--build-logargument to v2-build never gets used (though I may be mistaken here). It would be future work to confirm these flags are unused at the moment, and potentially to clean them up. Certainly something is still writing logs to~/.cabal/logs/ghc-x.x.x/pkg-name-hash.logbut I'm not sure of that codepath.