Skip to content

Promote the candidate/ambiguity API to installed public headers - #1486

Merged
frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:promote-conversion-candidates-api
Aug 26, 2026
Merged

frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:promote-conversion-candidates-api

Conversation

@frankslin

Copy link
Copy Markdown
Collaborator

GetAllConversions() and ConvertWithAmbiguities() were added in 1.4.2 for input-method engines, but their headers stayed in LIBOPENCC_PRIVATE_HEADERS, which CMake does not install. The symbols are exported, so a downstream project links fine -- it just has no declaration to include when building against an installed OpenCC, which is exactly how librime consumes us.

Move ConversionCandidates.hpp, ConversionAmbiguities.hpp and StreamWindow.hpp (needed for AmbiguityStream's default argument) into the installed set, drop the 'internal, unstable, not installed' caveats, and widen the Bazel targets' visibility. Purely additive: SOVERSION stays 1.4 and no existing downstream needs relinking.

The 1.4.2 changelog entry described a Converter::GetConversionCandidates member function and an OPENCC_ENABLE_UNSTABLE_API macro from an intermediate design in #1431; neither shipped. Leave the published text as it stands and add an erratum at the top of that section instead of rewriting it.

GetAllConversions() and ConvertWithAmbiguities() were added in 1.4.2 for
input-method engines, but their headers stayed in LIBOPENCC_PRIVATE_HEADERS,
which CMake does not install. The symbols are exported, so a downstream
project links fine -- it just has no declaration to include when building
against an installed OpenCC, which is exactly how librime consumes us.

Move ConversionCandidates.hpp, ConversionAmbiguities.hpp and StreamWindow.hpp
(needed for AmbiguityStream's default argument) into the installed set, drop
the 'internal, unstable, not installed' caveats, and widen the Bazel targets'
visibility. Purely additive: SOVERSION stays 1.4 and no existing downstream
needs relinking.

The 1.4.2 changelog entry described a Converter::GetConversionCandidates
member function and an OPENCC_ENABLE_UNSTABLE_API macro from an intermediate
design in BYVoid#1431; neither shipped. Leave the published text as it stands and
add an erratum at the top of that section instead of rewriting it.
@frankslin
frankslin merged commit 5618b3b into BYVoid:master Aug 26, 2026
41 checks passed
@frankslin
frankslin deleted the promote-conversion-candidates-api branch August 26, 2026 04:32
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.

1 participant