-
Notifications
You must be signed in to change notification settings - Fork 162
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
Info messages when loading package fails #610
Conversation
7f1afc6
to
71d8e61
Compare
71d8e61
to
f1d0636
Compare
Why do that rather than suggest DisplayPackageLoadingLog? |
Unless I am missing something,
|
520c9c4
to
4e30d3f
Compare
Why not display the full failure log as a default, or at least an actual error message, for instance the fact that |
@markuspf No fundamental reason, but extreme care is needed to present the right information. To decide what information is "right" you need a global overview of the package dependency/suggestion graph and of all the failures before you can start. Remember that the graph is not a tree (it's not even a DAG) so you have to distinguish packages which are connected to the users original request by a path consisting entirely of "needed" relations from one where there is always a "suggested" relation somewhere in the path. You do not want to print messages about the latter. |
Incidentally, is level 4 the right level. Usually level 3 is all that is needed to get relevant Info messages for anyone but the author of the code. |
Mhm. Maybe just setting I always call |
What you don't want is
which can happen if There are various possible small improvements but the "right" answer IMHO: is
Nothing short of this is really going to work reliably. |
One alternative option -- after loading failed, try loading the package again, ignoring all suggestions -- that should still fail, and will give a hopefully "minimal" explanation. It would mean that packages appear to mysteriously get loaded twice. |
@markuspf: But if you will just set
OTOH, my PR displays extra messages only in the case when loading package fails. @stevelinton: sometimes,
Moreover, my PR does not improve how the NQ package is handled. I should commit another change to |
Urgh. So as a proposition let's merge the original PR with @alex-konovalov's improvements coming up. The improvements that @stevelinton suggests we should keep around, maybe in an issue as something to hack on for later. |
Regarding the NQ package - the case from above happened because NQ package was missing in that GAP installation. So I've now committed an extra info message which produces the following output:
Indeed, in this case there is no point to suggest I suggest that we do merge this PR since it improves the situation, and keep @stevelinton's suggestions for the time when we will make a larger refactoring of the package loading mechanism. |
I would suggest that the message when a package is simply not present (a fairly common error for instance when you mistype a package name) should be less than 4 lines. It can refer to documentation if necessary. |
@stevelinton what about this:
|
Much better. Steve
|
a2ece90
to
8d31980
Compare
This PR attempts to address #480 by suggesting to increase InfoPackageLoading and retry to load the package. This happens only if
banner=true
when the package is loaded.For example,