You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to have a String function that describes src.Sources. One use is in cases such as hashicorp/terraform-plugin-testing#133, where they are logged or displayed to users
The text was updated successfully, but these errors were encountered:
I'm not opposed to the idea of adding String functions, but from what I can tell by reading the original linked issue, the real problem is usefulness of error types/messages, is it not?
So maybe we should ensure that errors returned from Ensure, Install and Remove, i.e. all essential methods on the Installer are wrapped in a custom error type, which also exposes what source produced that error?
The friction point I see with implementing String() is that it will be difficult to come up with an implementation that satisfies completeness and/or readability in all contexts.
I'm not opposed to the idea of adding String functions, but from what I can tell by reading the original linked issue, the real problem is usefulness of error types/messages, is it not?
Yes, that was the root problem we were looking at. I think exposing the source via a custom error, as you mentioned, would be good, however, if the errors are detailed enough that information may not be needed.
I didn't run into any particular errors from a source that were confusing so I'd be hesitant to suggest a change to hc-install without more detail.
It would be useful to have a
String
function that describessrc.Source
s. One use is in cases such as hashicorp/terraform-plugin-testing#133, where they are logged or displayed to usersThe text was updated successfully, but these errors were encountered: