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
Go uses minimum version selection (MVS) when figuring out shared dependencies. Usually this does the right thing, but in cases where replace directives are used, the MVS algorithm doesn't work. For the most part, replace should be temporarily used, or only used in development.
A package that has a replace directive will override any deps from the imported package, and any replace from the import are ignored.
However, this creates an issue if the imported package uses a replace and doesn't define a valid require for it still. Then the importing package must also use the same replace directive in order to compile. This creates a situation where every package in the chain needs to be synced to the same replace imports, and becomes difficult to upgrade later on. Remove all replace blocks that aren't absolutely required to build zk (note sometimes this is unavoidable as some k8s/docker libs have broken go.mods with replace in them).
After this, upgrading k8s versions should become much simpler and less items should be pinned. Packages that import zk won't have to pin to the exact same version.
Importance
Blocks upgrading bookkeeper, pravega-operator, and others.
Location
Multiple places.
Suggestions for an improvement
Update code to not include any deprecated/removed libraries (already merged, e2e tests are now compatible with latest)
Remove all deps
re-run go mod tidy
Set any k8s deps to the specific version using:
Description
Go uses minimum version selection (MVS) when figuring out shared dependencies. Usually this does the right thing, but in cases where replace directives are used, the MVS algorithm doesn't work. For the most part, replace should be temporarily used, or only used in development.
A package that has a replace directive will override any deps from the imported package, and any replace from the import are ignored.
However, this creates an issue if the imported package uses a replace and doesn't define a valid require for it still. Then the importing package must also use the same replace directive in order to compile. This creates a situation where every package in the chain needs to be synced to the same replace imports, and becomes difficult to upgrade later on. Remove all replace blocks that aren't absolutely required to build zk (note sometimes this is unavoidable as some k8s/docker libs have broken go.mods with replace in them).
After this, upgrading k8s versions should become much simpler and less items should be pinned. Packages that import zk won't have to pin to the exact same version.
Importance
Blocks upgrading bookkeeper, pravega-operator, and others.
Location
Multiple places.
Suggestions for an improvement
Update code to not include any deprecated/removed libraries (already merged, e2e tests are now compatible with latest)
Remove all deps
re-run
go mod tidy
Set any k8s deps to the specific version using:
do not use a replace block, this will still set it accurately in the go.mod:
The text was updated successfully, but these errors were encountered: