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
When running Cach2 on a source repo with the gomod package manager, changes are made to the go.mod file. This is presumably from running go mod tidy. It is also changing the sources when fetching the origin information for the git repository.
Cachi2 should not modify the sources that it is run on. Instead, it should operate on a temporary copy of the repository.
The text was updated successfully, but these errors were encountered:
arewm
changed the title
Cachi2 prefetching for gomod is making changes on the source.
Cachi2 prefetching is making changes on the source
Oct 23, 2024
Yes, this is known (or at least was common with projects requiring <=1.20 and having been processed with >=1.21). Recently we deprecated the --gomod-vendor-check and --gomod-vendor CLI flags that would have prevented us from fixing this (or at least not in a clean way). With those practically gone, we should be able to fix this in a simple and clean manner.
eskultety
changed the title
Cachi2 prefetching is making changes on the source
Cachi2 prefetching is making changes on a Go project's source
Oct 25, 2024
gomod has been the only backend that prevented us from using a
temporary working copy of the input repository with all package manager
backends. The reason for that was the existence of the:
* '--gomod-vendor'
* '--gomod-vendor-check', and
* '--force-gomod-tidy'
CLI flags that allowed the source repository to be dirtied by us. With
all of those flags now deprecated (treating them as NOOP) we can use a
temporary repository copy with gomod as well.
Resolves: containerbuildsystem#707
Signed-off-by: Erik Skultety <[email protected]>
When running Cach2 on a source repo with the gomod package manager, changes are made to the
go.mod
file. This is presumably from runninggo mod tidy
. It is also changing the sources when fetching the origin information for the git repository.Cachi2 should not modify the sources that it is run on. Instead, it should operate on a temporary copy of the repository.
The text was updated successfully, but these errors were encountered: