Repository navigation
fix(contract): discover service names through the go/ subdir convention - #24
Merged
Merged
Conversation
WithService names a service after the last element of its package path.
Once modules moved from dappco.re/go/<name> to
github.com/dappcore/<repo>/go, every subdir module's root package was
discovered as "go", so lookups by the real name failed: "ansible not found",
and config, forge, proxy, webview and lns the same.
discoverServiceName treats a `go` last element as the subdir-module
convention and uses the repo name minus any `go-` prefix:
github.com/dappcore/go-ansible/go → "ansible", the same as dappco.re/go/ansible.
Subpackages keep their own name. A bare or rootless "go" stays "go".
TestContract_discoverServiceName_{Good,Bad,Ugly} cover both path styles, the
empty path, subpackages and the edge cases.
Gates (GOWORK=off): go vet and go test ./... -count=1 pass.
Co-Authored-By: Virgil <virgil@lethean.io>
Contributor
|
Caution Review failedThe pull request is closed.
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
After the path move, every
github.com/dappcore/<repo>/goroot package was discovered as the service\"go\", which breaks lookups in ansible, config, forge, proxy, webview and lns.discoverServiceName: agolast element means "use the repo name minusgo-", sogo-ansible/go→\"ansible\", the same asdappco.re/go/ansible. Subpackages are unchanged. Covered by a Good/Bad/Ugly triplet.Gates (
GOWORK=off): vet andgo test ./...pass. Tagv0.14.0after merge.🤖 Generated with Claude Code
Co-Authored-By: Virgil virgil@lethean.io