You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: auto-convert Go library deps to weak dependencies
Go packages with packaging: library are now automatically treated as
weak dependencies when referenced. This means:
- Source files are copied to _deps/ (not built artifacts)
- go.mod replace directives are added
- Builds run in parallel (don't block dependent package)
- Version tracking ensures cache invalidation when libraries change
This improves build parallelism for Go monorepos where libraries
are used for source code via go.mod replace, not for built artifacts.
Co-authored-by: Ona <no-reply@ona.com>
Copy file name to clipboardExpand all lines: README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,8 @@ srcs:
108
108
- "glob/**/path"
109
109
# Deps list dependencies to other packages which must be built prior to building this package. How these dependencies are made
110
110
# available during build depends on the package type.
111
+
# NOTE: Go packages with `packaging: library` are automatically treated as "weak dependencies" - their source files
112
+
# are copied (not built artifacts), and they don't block the build. See "Go Library Dependencies" section below.
111
113
deps:
112
114
- some/other:package
113
115
# Argdeps makes build arguments version relevant. I.e. if the value of a build arg listed here changes, so does the package version.
@@ -125,6 +127,8 @@ config:
125
127
```YAML
126
128
config:
127
129
# Packaging method. See https://godoc.org/github.com/gitpod-io/leeway/pkg/leeway#GoPackaging for details. Defaults to library.
130
+
# IMPORTANT: Packages with `packaging: library` are treated as "weak dependencies" when referenced by other packages.
131
+
# This means their source files are copied (not built artifacts), and they build in parallel rather than blocking.
128
132
packaging: library
129
133
# If true leeway runs `go generate -v ./...` prior to testing/building. Defaults to false.
130
134
generate: false
@@ -144,6 +148,43 @@ config:
144
148
goMod: "../go.mod"
145
149
```
146
150
151
+
#### Go Library Dependencies (Weak Dependencies)
152
+
153
+
When a Go package with `packaging: library` is listed as a dependency, leeway automatically treats it as a "weak dependency". This behavior is optimized for Go's module system:
0 commit comments