Repository navigation
rockspec: Add lua-resty-string dependency - #353
Merged
Merged
Conversation
`lib/resty/http_connect.lua` requires `resty.string` at load time. Usually the dependency is already installed with OpenResty. Issues can only occur if the rock is used outside of OpenResty. Fixes #352
Contributor
Author
|
Trivial. No review required. Developed and tested with the help of IBM Bob Shell 2.1.0. So merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Report: add
lua-resty-stringto the rockspecSummary
User @leona-ya reported in #352 that
lua-resty-stringis required as a dependency oflua-resty-http. The code confirms this. The package was added todependenciesinlua-resty-http-0.18.0-0.rockspecand validated using the Docker setup described inDOCKER_BUILD.md.Code verification
lua-resty-stringlib/resty/http_connect.lua:8require("resty.string").to_hexat module load timeresty.stringin the Lua sources.require, soresty.http_connectcannot load without the package.Change
lua-resty-http-0.18.0-0.rockspec:dependencies = { - "lua >= 5.1" + "lua >= 5.1", + "lua-resty-string" }No version constraint was added, because the code requires no specific minimum version.
Validation
The image was built with
docker build -t lua-resty-http-builder:test .and the checks below were run in the container.luarocks lint lua-resty-http-0.18.0-0.rockspecluarocks install --deps-only lua-resty-http-0.18.0-0.rockspeclua-resty-string0.09-0 was resolved and installed.luacheck libmake coverageCoverage:
lib/resty/http.lualib/resty/http_connect.lualib/resty/http_headers.luaThe lint and
--deps-onlysteps are not inDOCKER_BUILD.md. They were added to check the rockspec itself.Notes
lua-resty-opensslwas not added in this change.lib/resty/http_connect.lua:14-18loadsresty.openssl.*inside anxpcall, so a missing module only logs a warning and disables mTLS. The README calls it "a prerequisite for all HTTP connections", so it could be added as a regular dependency if desired.Dockerfileinstallslua-resty-opensslbut notlua-resty-string. The OpenResty base image already providesresty.string, so the tests pass either way. The rockspec entry matters for plainluarocks installoutside OpenResty.lua-resty-http-0.18.0-0.rockspec.