| In Bolt ticket ([2853|https://github.com/puppetlabs/bolt/issues/2853] ) a user reported errors being unreadable when passing incorrect type to a plan function. This was especially noticeable with functions with optional arguments. I traced the primary issue to be in the type_mismatch_describer.rb file. In the message method, there is a check for whether to print the fully detailed message (vs the short_name). Previously, if the expected value and actual value evaluated to being the same class, the detailed description would always print. To get shorter messages for this use case, I added a few checks to differentiate between 'Target' and 'ResultType' objects which were previously evaluating to equal classes as PObjects. As of today, the primary concern with the proposed changes is whether they effect use cases where the long message is the expected/wanted behavior. |