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.
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
Fix --offline flag #8676
Fix --offline flag #8676
Changes from 14 commits
46ff2f7
60daa3d
aedb4bc
a4db7e2
2bacd71
82f3629
8617b5f
e088365
9ac83e9
c2bbca9
71c987b
96ce1e9
79776b5
eb6043f
2bfc4a2
3fe360c
9f5f902
d20174a
644044a
7ffaf46
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it shouldn't involve
error
: it's not an exceptional situation like a network failure, or something else out of our control, it's we who are refusing to do something because of the flag -- it's no exception! So, I think, it should beDependentFailed
rather thanDownloadFailed
. Perhaps someone has another opinion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DependentFailed
needs another package as a parameter this looks like it's used to say that the package that is failing has a dependency that failed. I need to say that this specific package failed while also not producing an exception. Nothing else in theBuildFailureReason
data type looked like it suited the problem so I added aGracefulFailure
option toBuildFailureReason
and it takes a string that will be printed to the terminal without any extra text or callstack, I think anything more specific would clutter up the data type more than is needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full disclosure: I'm no expert in Cabal error types. But, I thought that
DependentFailed
would work quite all right for this use case. Imagine you depend on 10 packages and 9 of them are in the cache. Then, you may want to know which one wasn't there. On the other hand, if there're two dependencies that are not in the cache then reporting just one is not so nice, perhaps. Although, I could live with reporting one that happened to be the first to be required during the build…That said, I don't have a strong preference. I'm just not a big fan of changing data types that sound fundamental. Cabal is a library and this would be a breaking change...