Feat/support sideeffect imports - #9
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for Go blank (side-effect) imports to the generated call graph so that changes in side-effect-only packages (via init()) correctly propagate to affected services during impact analysis.
Changes:
- Add a synthetic dependency edge for blank imports by linking importer package
init→ imported packageinitin the call graph’s reverse index. - Introduce a
testproject/core/sideeffectpackage and blank-import it fromservice-aas a concrete fixture. - Add/extend tests to validate blank-import impact propagation and reverse-index tracking.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| testproject/services/service-a/main.go | Adds a blank import of the new side-effect package to exercise the behavior. |
| testproject/core/sideeffect/sideeffect.go | New side-effect package with init() to simulate registration. |
| pkg/impact/impact_test.go | Adds an impact test covering propagation from side-effect-only dependencies. |
| pkg/analyzer/analyzer_test.go | Adds an integration-style test asserting the reverse index includes blank-import edges. |
| pkg/analyzer/analyzer.go | Implements synthesis of blank-import dependency edges during graph construction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Adds support for Go side-effect (blank) imports to the build graph so that changes in packages imported via import _ "pkg" correctly trigger rebuilds of importing services.
Changes:
- Add synthetic reverse-index edges for blank imports by linking importer
init→ importedinitduring graph build. - Add a new
testproject/core/sideeffectpackage and blank-import it fromservice-ato exercise the behavior. - Add/extend analyzer + impact tests covering blank-import dependency propagation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testproject/services/service-a/main.go | Introduces a blank import of core/sideeffect to create a side-effect-only dependency. |
| testproject/core/sideeffect/sideeffect.go | Adds a minimal side-effect package used by integration tests. |
| pkg/impact/impact_test.go | Adds a unit test for impact propagation when a side-effect dependency changes. |
| pkg/analyzer/analyzer_test.go | Adds an integration test asserting blank-import edges appear in the reverse index. |
| pkg/analyzer/analyzer.go | Implements synthesiseBlankImportEdges() and supporting namedImports() helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Adds support for Go side-effect (blank) imports in the build graph so that changes in packages imported only via import _ "..." still propagate rebuild impact to importing services.
Changes:
- Add a core
sideeffectpackage and blank-import it fromservice-ato represent a side-effect-only dependency. - Extend the analyzer to synthesize reverse-index (and deps) edges for internal blank imports.
- Add unit tests covering reverse-index tracking and impact propagation for side-effect-only dependencies.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testproject/services/service-a/main.go | Adds a blank import of the new side-effect package to exercise the behavior. |
| testproject/core/sideeffect/sideeffect.go | Introduces a minimal side-effect package via init() to simulate registration. |
| pkg/impact/impact_test.go | Adds an impact propagation test for a side-effect-only dependency edge. |
| pkg/analyzer/analyzer_test.go | Adds a BuildGraph test ensuring blank-import side-effect edges appear in the reverse index. |
| pkg/analyzer/analyzer.go | Implements blank-import edge synthesis by inspecting loaded package syntax/imports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Adds support for Go blank (_) imports (side-effect-only dependencies) so that the build graph can attribute init-time dependencies and schedule correct downstream service rebuilds when those packages change.
Changes:
- Add blank-import edge synthesis to
Analyzer.BuildGraph()to model side-effect dependencies in the call graph’s reverse index. - Extend the
testprojectfixture with a newcore/sideeffectpackage and a blank import fromservice-a. - Add tests covering blank-import/side-effect impact propagation in both
pkg/analyzerandpkg/impact.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/analyzer/analyzer.go | Synthesizes reverse-index edges (and Deps) for blank imports to represent side-effect dependencies. |
pkg/analyzer/analyzer_test.go | Adds integration test asserting side-effect dependency appears in the reverse index. |
pkg/impact/impact_test.go | Adds unit test asserting blank-import side-effect changes rebuild only the importing service. |
testproject/services/service-a/main.go | Adds a blank import of the new side-effect package to exercise the behavior. |
testproject/core/sideeffect/sideeffect.go | Introduces a minimal side-effect package with init() for the fixture. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
support sideeffect imports in build graph