ruipin / fvtt-lib-wrapper

Library for Foundry VTT which provides module developers with a simple way to modify core Foundry VTT code, while reducing the likelihood of conflict with other modules.
GNU Lesser General Public License v3.0
33 stars 13 forks source link

Include version numbers in "package detection errors" #80

Closed dmrickey closed 2 months ago

dmrickey commented 2 months ago

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)]

ruipin commented 2 months ago

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.

ruipin commented 2 months ago

Added in v1.12.14.0, specifically commit 23df043916bd6d044268bd4c1f50c76a55057bc0

dmrickey commented 2 months ago

Thanks! I think this will be very useful <3