Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move go.mod replaced forks to publicly accessible package. #40

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

wlynch
Copy link
Collaborator

@wlynch wlynch commented Aug 31, 2024

It's difficult to reference packages externally because of the replace directive referencing an internal package:

$ go install github.com/jonjohnsonjr/dagdotdev/cmd/oci
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:25:22: undefined: zstd.Checkpoint
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:95:32: undefined: zstd.Checkpoint
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:96:38: undefined: zstd.WithCheckpoints
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:100:10: cannot use zr (variable of type *"github.com/klauspost/compress/zstd".Decoder) as checkpointReader value in assignment: *"github.com/klauspost/compress/zstd".Decoder does not implement checkpointReader (missing method CompressedCount)

This moves the replaced packages from internal -> pkg so that downstream modules can replicate the same replace behavior.

It's difficult to reference packages externally because of the replace
directive referencing an internal package:

```
$ go install github.com/jonjohnsonjr/dagdotdev/cmd/oci
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:25:22: undefined: zstd.Checkpoint
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:95:32: undefined: zstd.Checkpoint
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:96:38: undefined: zstd.WithCheckpoints
/Users/wlynch/go/pkg/mod/github.com/jonjohnsonjr/dagdotdev@v0.0.7-0.20240821193425-772575746fe1/internal/soci/indexer.go:100:10: cannot use zr (variable of type *"github.com/klauspost/compress/zstd".Decoder) as checkpointReader value in assignment: *"github.com/klauspost/compress/zstd".Decoder does not implement checkpointReader (missing method CompressedCount)
```

This moves the replaced packages from internal -> pkg so that downstream
modules and replicate the same replace behavior.
@jonjohnsonjr jonjohnsonjr merged commit ea7241b into jonjohnsonjr:main Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants