Repository navigation
Promote the candidate/ambiguity API to installed public headers - #1486
Merged
frankslin merged 1 commit intoAug 26, 2026
Merged
Conversation
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.
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.
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.