Repository navigation
fix(deepdoc): add cgo constraints to native configuration tests - #21837
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Restrict tests to cgo builds internal/deepdoc/native/overridable_config_test.go, internal/deepdoc/parser/pdf/inference/native_analyzer/overridable_config_test.go |
Both test files now include a build constraint for cgo builds. |
Estimated code review effort: 1 (Trivial) | ~4 minutes
Change: Bug fix
Suggested reviewers: xugangqiang
Merge Risk: 
Minimal · up to 3aa35
-
The intended cgo-only test build behavior is correctly implemented, with no merge-blocking risk identified.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the build-time gate,
And keeps non-cgo tests to wait.
With cgo on, the tests can run,
Two small constraints, their work is done.
The rabbit hops beneath the sun.
Harsh23Kashyap
left a comment
There was a problem hiding this comment.
Verified at head 3aa35be. On main these two test files are the only Go files in their packages without cgo constraints, so CGO_ENABLED=0 fails to compile both packages (undefined: modelFileDet in internal/deepdoc/native, undefined: tsrCellsFn in native_analyzer; reproduced locally with go vet). With this change CGO_ENABLED=0 go vet is clean for both packages, and the tags match the convention every sibling source and test file already follows. LGTM.
|
LGTM |
Add cgo build constraints to both DeepDoc native configuration tests to fix test compilation when CGO_ENABLED=0