-
Notifications
You must be signed in to change notification settings - Fork 22
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
catch exceptions in GAP.Packages.install
#815
catch exceptions in GAP.Packages.install
#815
Conversation
Codecov Report
@@ Coverage Diff @@
## master #815 +/- ##
==========================================
- Coverage 78.05% 78.03% -0.03%
==========================================
Files 48 48
Lines 3669 3687 +18
==========================================
+ Hits 2864 2877 +13
- Misses 805 810 +5
|
It addresses it only partially, though: Oscar expects these packages (well, at least ferret) to be loaded in certain places. And by simply silencing the error during startup, we will cause these functions later on to break with no helpful error. As it is, if go this way, then at the least we should also change Oscar.jl to explicitly check for an error return value when calling this Anyway, of course this is still vastly better than the current situation, where some people can't load Oscar at all. As always, the real fix would be to get GAP_pkg_ferret and so on ready... I'll try to put that in focus again sigh. |
@fingolfin I agree. In the current setup, the Thus the only additional question seems to be where to add suitable warnings about possible performance problems. (Another point: A quick fix for Oscar would be to wrap the |
I've thought some more about it, and I guess perhaps the "best" fix actually would be to adjust our hack further up in the file you are editing here, where we overwrite a PackageManager function to make it use Julia's |
@fingolfin My idea was to catch any error that may happen on the GAP side during the attempt to install the package, not only the "offline problem". Perhaps we should use each of the two ideas? |
Yeah, sounds sensible |
O.k., I will modify the pull request. |
@ThomasBreuer do you think you'll have a chance to revise this today? Otherwise, I'd just merge this as-is and make a release, so that the immediate bug is fixed; a "better" fix can be done later. |
@fingolfin I hope the variant I just pushed is good. |
src/packages.jl
Outdated
catch e | ||
rethrow() | ||
end |
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.
But that's completely redundant, it does nothing at all. I.e. you could just leave it out.
How about this instead?
catch e | |
rethrow() | |
end | |
catch e | |
return GapObj(Dict{Symbol, Any}(:success => false)) | |
end |
This reverts commit 5324a07.
This addresses oscar-system/Oscar.jl/issues/1364.