Better Lua require package.path

I’ve just logged my first request on the Jira, Service Desk but it does not seem to offer the visibility for community participation. So I’m duplicating it here.

We’ve run into a number of infelicities in developing a plug in. Some I think I define as independent issues and will, others may just end up as part of a brain dump on Unable to Upload or Install a plugin - #23 by Leonardo_Soto .


Description

Allow additions to Lua package.path in the config.json file.

And/or automatically add the plugin root to the package.path.

Our plugin has a number of modest size files as we try to keep things broken up. We've just had to add a plugin prefix name and will have to rename again!

Lua's package.path is effectively unavailable to us because of a permission enforcement mechanism. All our code is in HUB:prefix_name.plugin_name/scripts, where prefix_name and plugin_name are replaced with their actual name.

There's a pile of requires at the head of each of our files. We'd like factor the out the boilerplate.

Can you help?

Hi,

We will be investigating your requirement and will let you know as soon as we have something new.

1 Like