hof: Nested module replace directives are ignored

As written here

https://github.com/hofstadter-io/hof/blob/ac766d2494f3968a0e2836a52fd206ae278d4563/lib/mod/modder/modder_vendor.go#L153

module replace directive are ignored for nested dependencies. But since the original directive is put in cue.sums, it fails when having nested dependencies.

One simple way to reproduce it is by including a dependency that depends on another lib using a replace statement.

If I do not ignore the replace directive:

err = m.LoadMetaFiles(mdr.ModFile, mdr.SumFile, mdr.MappingFile, false) 

it does work, but I suspect there is a reason behind this ignore that I missed. Another way to fix it - I guess - would be to use the replace directive inside the cue.sums file.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

sgtm, I think this one may only require a small addition to the gitlab.Fetch function. That seems the best place to catch it without having to worry about the memoization going on.