Skip to content

feat: allow customizing lua_package_path & lua_package_cpath#3417

Merged
spacewander merged 4 commits into
apache:masterfrom
spacewander:3rd
Jan 27, 2021
Merged

feat: allow customizing lua_package_path & lua_package_cpath#3417
spacewander merged 4 commits into
apache:masterfrom
spacewander:3rd

Conversation

@spacewander

Copy link
Copy Markdown
Member

Signed-off-by: spacewander [email protected]

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@spacewander
spacewander marked this pull request as ready for review January 26, 2021 02:29
Comment thread .travis/apisix_cli_test/test_main.sh Outdated
make stop

if grep "failed to load plugin [3rd-party]" logs/error.log > /dev/null; then
echo "failed: 3rd party plugin can not be loaded"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it’s better to use 3rd-party to keep the plugin name consistent,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Comment thread .travis/apisix_cli_test/test_main.sh Outdated
echo "failed: 3rd party plugin can not be loaded"
exit 1
fi
echo "passed: 3rd party plugin can be loaded"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Signed-off-by: spacewander <[email protected]>
Comment thread doc/plugin-develop.md Outdated
- [**register public API**](#register-public-api)
- [**register control API**](#register-control-api)

## where to put your plugin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugin => plugins.

Comment thread apisix/cli/ops.lua
if conf then
local path = conf
if path:byte(-1) ~= str_byte(';') then
path = path .. ';'

@tokers tokers Jan 26, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if conf is "", it'll return ";", is this OK for the lua_package_path directive?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

Signed-off-by: spacewander <[email protected]>
Signed-off-by: spacewander <[email protected]>
@spacewander
spacewander merged commit d752b6f into apache:master Jan 27, 2021
@spacewander
spacewander deleted the 3rd branch January 27, 2021 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants