Create icon indicating copy to clipboard operation
Create copied to clipboard

[1.21.1] Allow the use of linear-time, threadsafe regex-based matching as an alternative to globs

Open IntegralPlusC opened this issue 1 year ago • 3 comments

This PR

  • Adds a game setting, enableAdvancedRegex, which requires a world reload to enable.
  • Adds buttons to several UIs of logistics-related devices to allow regex-based package and station address matching
  • Adds a utility class LogisticParser and some utility methods to allow matching either globs or regex depending on the setting

I playtested this and it seemed to be functional, but if I missed anything important (or minor, really), feel free to change or just let me know ASAP.

IntegralPlusC avatar Apr 16 '25 18:04 IntegralPlusC

Note: The regex library in question is RE2/J. Also, it seems that I still excluded the FTB libraries, but I noticed that change; fixing rn.

IntegralPlusC avatar Apr 16 '25 18:04 IntegralPlusC

Is there a technical reason this isn't on 1.20.1? If so, that's probably fine but you should otherwise aim to PR to the earliest still supported version. Since this PR would have Create shipping that regex library this PR should make sure its license is adhered to, which doesn't appear to be the case yet.

VoidLeech avatar Apr 20 '25 17:04 VoidLeech

Is there a technical reason this isn't on 1.20.1? If so, that's probably fine but you should otherwise aim to PR to the earliest still supported version.

Since this PR would have Create shipping that regex library this PR should make sure its license is adhered to, which doesn't appear to be the case yet.

In terms of 1.20.1 not being supported, there's no technical issue that I can tell, and I would be happy to backport!

In terms of the license, it would seem that all I need do is include the license file in the PR. Is that right, or am I missing something here?

Thanks!

IntegralPlusC avatar Apr 20 '25 19:04 IntegralPlusC

Thanks for this PR but we feel this would be better suited as a addon, as this feature requires bundling another library and increases the code complexity alongside the risk of introducing extra bugs.

IThundxr avatar May 10 '25 14:05 IThundxr

Thanks for this PR but we feel this would be better suited as a addon, as this feature requires bundling another library and increases the code complexity alongside the risk of introducing extra bugs.

Got it. Thanks for the consideration, and I look forward to making my first addon!

IntegralPlusC avatar May 14 '25 21:05 IntegralPlusC