ruipin/fvtt-lib-wrapper

Include version numbers in "package detection errors"

Closed this issue · 3 comments

Right now if a problem is detected, it gives output like: [Detected 3 packages: system:the-system, lib-wrapper, the-mod]

If a user is reporting a problem, it can be hard to know exactly what's going on if the user's versions aren't up to date and they're using an outdated version of the mod and/or system. It would be very helpful if libwrapper could report the version numbers in the error message. So something like: [Detected 3 packages: system:the system(v10.2), lib-wrapper(v1.12.13.1), the-mod(v1.3.0)]

I was trying to avoid adding too much text, but this shouldn't be hard to do and I guess it doesn't increase the text size too much...

The function that handles this is get_involved_packages_message (https://github.com/ruipin/fvtt-lib-wrapper/blob/master/src/errors/error-utils.js#L52-L66) and the package version can be accessed through package.version, an accessor of the PackageInfo type (see https://github.com/ruipin/fvtt-shared-library/blob/def3c9e44c7ff4c06f5cdb1b0f0fdb234ae6d49f/package_info.js#L429-L431).

I'll work on this once I find some time.

Added in v1.12.14.0, specifically commit 23df043

Thanks! I think this will be very useful <3