Skip to content

chore(*): release 1.2.0 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
All notable changes to `lua-resty-ada` will be documented in this file.

## [1.2.0] - Unreleased
### Fixed
- Ada library will now be also loaded from <lib>.so|.dylib.<version>, in addition to
wrong <lib>.<version>.so|.dylib.
### Changed
- Bumped Ada to `3.2.1`
- Bumped Ada to `3.2.4`

## [1.1.0] - 2024-09-03
### Added
Expand Down
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ project(
ada
DESCRIPTION "Fast spec-compliant URL parser"
LANGUAGES C CXX
VERSION 3.2.1
VERSION 3.2.4
)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
Expand All @@ -18,8 +20,8 @@ include(FetchContent)

FetchContent_Declare(
ada
URL https://github.com/ada-url/ada/releases/download/v3.2.1/singleheader.zip
URL_HASH SHA256=2954ff2208aa016de4213af7371273e1c41c71571e373eadf550ada808c79f42
URL https://github.com/ada-url/ada/releases/download/v3.2.4/singleheader.zip
URL_HASH SHA256=bd89fcf57c93e965e6e2488448ab9d1cf8005311808c563b288f921d987e4924
)

FetchContent_MakeAvailable(ada)
Expand Down
2 changes: 1 addition & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openresty/openresty:1.27.1.1-0-noble
FROM openresty/openresty:1.27.1.2-0-noble

ENV DEBIAN_FRONTEND noninteractive
ENV TEST_NGINX_BINARY openresty
Expand Down
17 changes: 11 additions & 6 deletions lib/resty/ada/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,25 @@ do
"ada",
}

local library_extensions = ffi.os == "OSX" and { ".dylib", ".so", }
or { ".so", ".dylib", }


local library_versions = {
"",
".3",
".2",
}

local library_extensions = ffi.os == "OSX" and { ".dylib", ".so", }
or { ".so", ".dylib", }

-- try to load ada library from package.cpath
for _, library_name in ipairs(library_names) do
for _, library_version in ipairs(library_versions) do
for _, library_extension in ipairs(library_extensions) do
local lib = load_lib_from_cpath(library_name .. library_version .. library_extension)
for _, library_extension in ipairs(library_extensions) do
for _, library_version in ipairs(library_versions) do
local lib = load_lib_from_cpath(library_name .. library_extension .. library_version)
if lib then
return lib
end
lib = load_lib_from_cpath(library_name .. library_version .. library_extension)
if lib then
return lib
end
Expand Down