Better decompression messages.
1ps3 opened this issue ยท 7 comments
Is your feature request related to a problem? Please describe.
There have been quire a few times in discord where someone comes along with a decompression issue, most of the time it's them trying to import a string for another addon directly into WeakAuras.
Describe the solution you'd like
I understand that this might be a bit undesirable but it would be quire nice to expand decompression to detect strings from other popular addons and report to the user that they are trying to import a string from a specific addon into WeakAuras.
I mean probably. I have no idea how the lib works, but I'm assuming a "Not for WeakAuras" tag would just show up for incomplete strings too. Plus going the extra mile would be nice.
Well that would be nice to have, wago.io might already have the necessary code for that.
I checked the wago sources, and it does two things, first checks with regexps which addons it could be and then decodes it via the various methods.
The regexps are:
looksLikeElvUI: /^[a-zA-Z0-9=\+\/]*$/,
looksLikeGrid: /^\[=== (.*) profile ===\]\n[ABCDEF0-9\n]+\n\[===/m,
looksLikeMDT: /^[a-zA-Z0-9\(\)]*$/,
looksLikePlater: /^[a-zA-Z0-9\(\)]*$/,
looksLikeTotalRP3: /^\^.+\^\^$|^![a-zA-Z0-9\(\)]*$/,
looksLikeVuhDo: /^[a-zA-Z0-9=\+\/]*$/,
looksLikeWeakAura: /^!?[a-zA-Z0-9\(\)]*$/,
Thus via regexp, detecting Grid, TotalRP3 is possible, everything else is pratically impossible to distinguish without trying to decode it.
Yeah, I don't think this is really in scope. We could certainly detect if a given string is intended for vuhdo or elvui or plater or whatever, but that would be a quite annoying moving target to maintain.
We could adjust the error message we get when attempting this to be more user-friendly, though.