Skip to content

fix: Restore GenerateJSON so plugin binaries keep method dead code elimination - #2664

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
fix-docs-json-deadcode
Nov 5, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
fix-docs-json-deadcode

Conversation

@murarustefaan

Copy link
Copy Markdown
Member

Summary

The doc command calls GenerateJSON again, because Generate links text/template and turns off method dead code elimination in every plugin binary.

AWS source plugin binary (linux/amd64) Size
plugin-sdk v4.99.1 324 MB
plugin-sdk v4.100.0 560 MB
This branch 323 MB

Manual QA

  • TestPluginBinaryKeepsMethodDeadCodeElimination fails on main (text/template.(*state).evalField <ReflectMethod> is reachable) and passes on this branch.
  • AWS source plugin built against this branch: no reachable reflect method in -ldflags=-dumpdep.
  • make lint test passes.

Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines
  • Run go fmt to format your code
  • Lint your changes via golangci-lint run
  • Update or add tests
  • Ensure the status checks below are successful

@murarustefaan
murarustefaan requested a review from a team as a code owner November 5, 2026 12:54
@murarustefaan
murarustefaan requested a review from stoovon November 5, 2026 12:54
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

⏱️ Benchmark results

Comparing with 6a9b030

  • Glob-8 ns/op: 152.9 ⬆️ 18.25% increase vs. 6a9b030
  • Hash1K_New-8 ns/op: 2,496 ⬆️ 1.96% increase vs. 6a9b030
  • Hash1K_Sum-8 ns/op: 2,481 ⬆️ 0.81% increase vs. 6a9b030
  • Hash320Bytes_New-8 ns/op: 883.5 ⬇️ 0.33% decrease vs. 6a9b030
  • Hash320Bytes_Sum-8 ns/op: 917 ⬇️ 34.79% decrease vs. 6a9b030
  • Hash8Bytes_New-8 ns/op: 190.4 ⬇️ 34.61% decrease vs. 6a9b030
  • Hash8Bytes_Sum-8 ns/op: 175.8 ⬆️ 0.34% increase vs. 6a9b030
  • Hash8K_New-8 ns/op: 18,446 ⬇️ 32.38% decrease vs. 6a9b030
  • Hash8K_Sum-8 ns/op: 18,655 ⬇️ 46.09% decrease vs. 6a9b030

@stoovon stoovon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two suggestions. Neither is a blocker:

  1. The test passes if -dumpdep prints nothing. Please also assert that one known edge is present, for example docs.(*Generator).GenerateJSON.
  2. A short comment on GenerateJSON would say why it is separate from Generate: Generate links text/template. Without that comment, it was removed once already as a duplicate.

@kodiakhq
kodiakhq Bot merged commit 248393e into main Nov 5, 2026
10 checks passed
@kodiakhq
kodiakhq Bot deleted the fix-docs-json-deadcode branch November 5, 2026 13:07
kodiakhq Bot pushed a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


## [4.100.1](v4.100.0...v4.100.1) (2026-11-05)


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.29.0 ([#2662](#2662)) ([6a9b030](6a9b030))
* Restore GenerateJSON so plugin binaries keep method dead code elimination ([#2664](#2664)) ([248393e](248393e))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants