Skip to content

Conversation

@yzqzss
Copy link
Collaborator

@yzqzss yzqzss commented Oct 28, 2025

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.62%. Comparing base (33782fc) to head (abadfe8).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #511      +/-   ##
==========================================
+ Coverage   56.36%   56.62%   +0.26%     
==========================================
  Files         130      130              
  Lines        8131     6479    -1652     
==========================================
- Hits         4583     3669     -914     
+ Misses       3184     2446     -738     
  Partials      364      364              
Flag Coverage Δ
e2etests 41.28% <100.00%> (+0.59%) ⬆️
unittests 29.18% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yzqzss
Copy link
Collaborator Author

yzqzss commented Oct 28, 2025

golang/go#44695 (comment)

CI fails because CGO_ENABLE="1" but we no longer use cgo.

Update: Hmm, completely removing the cgo goada wasn't a good idea, since wasm has a much greater performance penalty than cgo.
So I changed this PR so that when CGO_ENABLE=1 the build uses goada, and when CGO_ENABLE=0 the build uses my goada-wasm :) .

@yzqzss yzqzss closed this Oct 28, 2025
@yzqzss yzqzss reopened this Oct 28, 2025
@yzqzss yzqzss changed the title Using wasm to avoid CGO for ada Using goada-wasm if CGO_ENABLE=0 Oct 28, 2025
@yzqzss yzqzss requested a review from Copilot October 28, 2025 15:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables Zeno to build and run without CGO by introducing a WebAssembly-based URL parser (goada-wasm) as an alternative to the CGO-dependent goada library. The change makes CGO optional rather than required, allowing the project to compile on systems without C++ compiler toolchains at the cost of reduced performance on non-amd64/arm64 architectures.

Key Changes:

  • Added CGO-free URL parsing implementation using goada-wasm package
  • Updated build process to test both CGO-enabled and CGO-disabled configurations
  • Revised documentation to reflect that CGO is now optional

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/pkg/preprocessor/url_cgofree.go New CGO-free implementation of URL normalization using goada-wasm
internal/pkg/preprocessor/url_cgo.go Added build tag and Backend() function to existing CGO implementation
go.mod Added goada-wasm v1.0.1 dependency
cmd/cmd.go Added URL parser backend information to CLI help output
README.md Updated requirements section to document CGO as optional with performance tradeoffs
.github/workflows/go.yml Enhanced CI to test both CGO-enabled and CGO-disabled builds
.github/copilot-instructions.md Updated internal documentation to reflect optional CGO dependency

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.

3 participants