mirror of
https://github.com/imjasonh/slight
synced 2026-07-07 00:33:20 +00:00
1.5 KiB
1.5 KiB
Next Steps
-
in addition to running 'go build' on the debloated codebase, we also need to 'go test'
- this ensures we didn't delete dependency code that tests rely on, that main code doesn't
-
add --verbose flag to show more detailed output during analysis and debloating
- use this during tests
- maybe output to a file if it's very noisy
-
when debloating, add a report about what was deleted, and how much was kept
- e.g. "original vendor size: 50MB, debloated size: 12MB, 76% reduction"
- try to determine the change in binary size as well (if possible)
- go compiler's tree-shaking should remove unused symbols, so it shouldn't have any effect, but worth measuring
- try to determine the change in dependency test coverage as well (if possible)
Known Limitations
-
Build tags: Files with build tags are completely skipped (may leave dead code)
-
Reflection: If main code uses
reflecton vendored types, analysis may incorrectly mark symbols as unused -
cgo/assembly: Not supported, tool fails if present
-
Generated code: No special handling (treated like regular code)
-
Internal packages: Handled like any other vendor code
-
Experimental: This is a demo/experimental tool, not production-ready
Open Questions / Future Work
- Should we support
go.workworkspaces? - Could we integrate with
go mod vendorto re-vendor after debloating? - Performance optimization for very large monorepos (parallel analysis?)
- Support for analyzing specific build tags rather than skipping them