-
-
Notifications
You must be signed in to change notification settings - Fork 13
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Discussion: Error logging during packument resolving. #148
Comments
See #41 (comment). Op1, If we take the priority of [upstreamRegistries..., primaryRegistry] from higher to lower (which is the opposite of the current behavior), then the logging is easier to define:
This removes the ability to overwrite an upstream registry package by creating the same named package in the primary registry, which can be chaotic, and probably a false promise depending on Unity Packman's behavior. It's better to give the upstream registries a higher priority. Op2, Just for discussion, if we take the primary registry higher priority, then we have to search for reverse([upstreamRegistries..., primaryRegistry]), and continue the search even until find the desired package name and version, or log an error after the all candidates get searched. I prefer the Op1. |
For Op1.Example 1 & 2: The upstream registry is searched first and the packument is found. Example 3:
Extra logging for debugging/inspectingLog all action/extra info in the debug level. In case a user gets curious about what happens internally, just use
Handle network error/server 5xx errorIf one of the registry chains failed with a network error a server failure 5xx. Stop the whole search and inform the user of the issue. Inform "fixable" error messageThe Unity editor just shows an error message for package version mismatch.
If we want to show a "fixable" error message by default (without
Thought? |
Seems good to me. I will keep the issue open, in case anyone else wants to chime in, otherwise I will do as you suggested. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
While working on more complex packument resolving logic, I came upon an open question, that I would like to open to discussion. That is concerning, which errors/infos should be printed to the user while resolving packuments.
Here are a few examples that I would like to get others opinions on. I provide the scenarios for the primary and upstream registry, but please imagine it for n registries, in the case that #49 is implemented.
Example 1
Scenario:
Question:
Should the "Packument not found" error for the primary registry be logged? In my opinion, no, because it is overruled by the packument being found in the upstream registry.
Example 2
Scenario:
Question:
Should the user be informed that the packument was found in the primary registry?
Example 3
Scenario:
Question:
Should the user be informed that the packument was found in the primary registry, or should it count as a "packument not found", since it was not found in the "last" registry.
The above examples can be generalized to: If I search n registries and the different registries match the query differently well (some don't contain the packument, some have it, but not the version, some are incompatible, etc.) how should this information be presented to the user? Should all issues be logged? Only the "most fixable"? Only the last?
I'm curious to hear your opinions :)
The text was updated successfully, but these errors were encountered: