sprig icon indicating copy to clipboard operation
sprig copied to clipboard

fix: update to mergo 1.0.0

Open caarlos0 opened this issue 2 years ago • 14 comments

caarlos0 avatar Jul 31 '23 16:07 caarlos0

@mattfarina Can we get this merged? This fixes a larger issue rather than just bumping up the version of mergo 1.0.0. Mergo switched their repo url from a gh url to a vanity url. See here: https://github.com/darccio/mergo/issues/245

nibbleshift avatar Oct 11 '23 20:10 nibbleshift

@mattfarina please merge. The current experience is rather painful, even when that's an upstream issue:

go get -u

go: github.com/imdario/[email protected]: parsing go.mod:
	module declares its path as: dario.cat/mergo
	        but was required as: github.com/imdario/mergo
	trying github.com/imdario/[email protected]

andig avatar Nov 08 '23 07:11 andig

Note that readme also has this:

Sprig leverages mergo to handle merges. In its v0.3.9 release, there was a behavior change that impacts merging template functions in sprig. It is currently recommended to use v0.3.10 or later of that package. Using v0.3.9 will cause sprig tests to fail.

Not sure if upgrading to post 0.3.11 would break anything? Is fixing this a prerequisite?

andig avatar Nov 08 '23 07:11 andig

please merge this PR

tantinhte avatar Dec 29 '23 10:12 tantinhte

please merge this. its extremely annoying and its breaking random tooling such as renovate

stan-stately avatar Jan 02 '24 04:01 stan-stately

I suggest decoupling from mergo to permanently solve this accident. @all

phuslu avatar Jan 13 '24 14:01 phuslu

Using v0.3.9 will cause sprig tests to fail.

@mattfarina I've re-run the tests on mergo 1.0- all fine:

sprig mergo
❯ grb master
Current branch mergo is up to date.

sprig mergo
❯ got ./...
ok  	github.com/Masterminds/sprig/v3	4.329s

andig avatar Feb 03 '24 10:02 andig

@caarlos0 would you mind updating the README, too?

andig avatar Feb 03 '24 10:02 andig

For anyone impacted, add the following line at the bottom of go.mod in the meantime:

replace github.com/imdario/mergo => dario.cat/mergo v1.0.0

oliverpool avatar Mar 06 '24 07:03 oliverpool

For anyone impacted, add the following line at the bottom of go.mod in the meantime:

replace github.com/imdario/mergo => dario.cat/mergo v1.0.0

FWIW this doesn't actually work if your users do go install your-tool

caarlos0 avatar Mar 08 '24 16:03 caarlos0

@caarlos0 would you mind updating the README, too?

which part?

caarlos0 avatar Mar 08 '24 16:03 caarlos0

I think this needs be removed if no longer an issue:

IMPORTANT NOTES Sprig leverages mergo to handle merges. In its v0.3.9 release, there was a behavior change that impacts merging template functions in sprig. It is currently recommended to use v0.3.10 or later of that package. Using v0.3.9 will cause sprig tests to fail.

andig avatar Mar 08 '24 17:03 andig

Bump, this would be very useful thanks

oliver-anz avatar Apr 03 '24 02:04 oliver-anz

A fork is being considered, interested community members should consider adding their efforts there https://github.com/Masterminds/sprig/issues/396

ripienaar avatar Apr 17 '24 08:04 ripienaar