build(etl): rename submodule path to match directory for Go consumability#300
Merged
Conversation
…lity The etl submodule declared its module path as `github.com/OpenAudio/go-openaudio/etl` while living in the directory `pkg/etl/`. Go's multi-module repo rules require the module path to match the directory path within the repo — otherwise external consumers can't resolve the submodule at all, regardless of how tags are formatted. Quoting Go's docs on multi-module repos: > A version tag in a module subdirectory must be prefixed with the > relative path from the root of the repository to the module's go.mod > file, followed by '/'. For example, the module example.com/repo/sub > at version v1.5.2 corresponds to the tag sub/v1.5.2. Concretely, `go get github.com/OpenAudio/go-openaudio/etl@v1.3.0` fails with "module github.com/OpenAudio/go-openaudio@v1.3.0 found, but does not contain package github.com/OpenAudio/go-openaudio/etl" — Go interprets the path as a subpackage of the parent module (since no `etl/` directory exists at repo root) and never finds it. Changes: - pkg/etl/go.mod: `module github.com/OpenAudio/go-openaudio/etl` → `module github.com/OpenAudio/go-openaudio/pkg/etl` - Rewrite ~54 import statements across cmd/, pkg/, examples/. - Root go.mod: bump the etl require + replace directive to the new module path. - release-please-config.json: change the etl package's `component` and `package-name` from "etl" to "pkg/etl" so generated tags become `pkg/etl/vX.Y.Z` (matching Go's submodule tag convention). - pkg/etl/README.md and pkg/etl/FEATURE.md: stale path references. After this lands, the previously-pushed `pkg/etl/v1.3.0` tag becomes externally consumable via `go get github.com/OpenAudio/go-openaudio/pkg/etl@v1.3.0`. The bad `etl/v1.3.0` tag (deleted earlier in this work) will not be recreated by release-please now that the component name is corrected. Verified `go build ./...` clean in both the root module and pkg/etl/.
e327ddf to
719bf1a
Compare
Contributor
Author
|
Updated to also fix the 10 To answer the original question: yes, the explorer keeps working in prod after this change. Confirmed by:
The explorer imports ( Updated PR is force-pushed; please re-review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The etl submodule declared its module path as `github.com/OpenAudio/go-openaudio/etl` while living in the directory `pkg/etl/`. Go's multi-module repo rules require the module path to match the directory path within the repo — otherwise external consumers can't resolve the submodule at all, regardless of how tags are formatted.
Quoting Go's docs on multi-module repos:
Concretely, with the old setup:
```
$ go get github.com/OpenAudio/go-openaudio/etl@v1.3.0
go: module github.com/OpenAudio/go-openaudio@v1.3.0 found,
but does not contain package github.com/OpenAudio/go-openaudio/etl
```
Go interprets the path as a subpackage of the parent module (since no `etl/` directory exists at repo root) and never finds it. The pkg/etl/v1.3.0 tag I pushed earlier in this thread is currently inert.
Changes
After this lands
Side note
Closed #298 (the release-please PR with the old `etl/v1.4.0` tag format) before opening this. Release-please will reopen with the correct format after this merges.
Verified
`go build ./...` clean in both modules. Only `go vet ./...` warnings are pre-existing in unrelated packages.