Refactor(index): remove unused keys, 0-based depth, and add CI workflows#149
Merged
Conversation
wenchy
requested changes
Mar 10, 2026
| // is needed by any subsequent regular index's leveled containers. | ||
| func (x *Generator) needMapKeyForIndex(mapDepth int) bool { | ||
| for levelMessage := x.descriptor.LevelMessage; levelMessage != nil; levelMessage = levelMessage.NextLevel { | ||
| if len(levelMessage.Indexes) > 0 && levelMessage.MapDepth-2 >= mapDepth { |
Member
There was a problem hiding this comment.
please give comment to describe the magic number 2 in levelMessage.MapDepth-2
Collaborator
Author
There was a problem hiding this comment.
a new function NumLeveledContainers is added
wenchy
requested changes
Mar 10, 2026
Comment on lines
+67
to
+69
| func (l *LevelMessage) NumLeveledContainers() int { | ||
| return l.MapDepth - 2 | ||
| } |
Member
There was a problem hiding this comment.
NumLeveledContainers -> UpperContainers ?
Collaborator
Author
There was a problem hiding this comment.
ai generated function name
- Implemented the Fruit5Conf message structure with a 3-level map (fruit_map -> country_map -> item_map). - Added indexing functionality for the country level, allowing retrieval of countries by name. - Updated generator logic to handle the new Fruit5Conf structure without generating extra LevelIndex key structs. - Enhanced tests to validate the behavior of the new Fruit5Conf, ensuring correct index generation and retrieval. - Updated Go and C++ loader implementations to support the new Fruit5Conf message. - Added a minimal JSON configuration file for Fruit5Conf.
…Container structure
- Remove shell: bash from Init/Generate steps to use default cmd on Windows - Add working-directory to CMake Configure step - Fix gen_script paths relative to working-directory
- Fix testing-cpp.yml: skip CMake setup action on Linux, install cmake via apt instead - Improve cpp-tableau-loader gen.sh and gen.bat scripts - Update go-tableau-loader gen.sh and gen.bat scripts - Update CMakeLists.txt and init.bat
- Simplified the initialization of LevelMessage and IndexDescriptor in tests. - Removed redundant depth and map depth assignments for clarity. - Consolidated index definitions to reduce repetition and enhance maintainability. - Updated test assertions to reflect the new structure and ensure accuracy. - Removed obsolete test for map keys collection as it is no longer relevant.
… LNK2038 mismatch
…ult static runtime
…latform protobuf linking Key changes: - Use find_package(Protobuf CONFIG REQUIRED) instead of MODULE mode to correctly pick up protobuf's own config files from the local build directory. - Disable ZLIB dependency (-Dprotobuf_WITH_ZLIB=OFF) in protobuf build to avoid ZLIB::ZLIB link requirement in exported CMake targets. - Explicitly set -Dprotobuf_BUILD_SHARED_LIBS=OFF for clarity. - Use Ninja generator and Debug build type consistently on both Ubuntu and Windows. - protobuf::libprotobuf imported target auto-provides include dirs, so removed manual Protobuf_INCLUDE_DIRS from include_directories(). - Static CRT (/MTd) on MSVC matches protobuf's default static runtime.
wenchy
approved these changes
Mar 12, 2026
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.
Refactor the index/ordered-index processing pipeline to remove unused map keys, switch to 0-based depth semantics, and streamline key collection logic across both Go and C++ code generators. Additionally, add comprehensive CI testing workflows for Go and C++ on Ubuntu and Windows.