Skip to content

Commit

Permalink
sourcebundle: Bundle.SourceForLocalPath returns FinalSource
Browse files Browse the repository at this point in the history
Currently this function can only possibly return RemoteSource values
anyway and so the distinction between Source and FinalSource is moot, but
semantically it's more correct to say that we're returning a finalized
source address here and so using the more correct type will make this
compose better with other functionality which works generically with
final source addresses, and will also allow us to potentially make this
return registry addresses sometimes if we decide that gives better results
for the assumed use-case of producing diagnostic messages.
  • Loading branch information
apparentlymart committed Jun 5, 2023
1 parent 416506d commit 120227c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sourcebundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (b *Bundle) LocalPathForFinalRegistrySource(addr sourceaddrs.RegistrySource
// instead of exposing the opaque internal directory names from the source
// bundle. This function should not typically be used in performance-sensitive
// portions of the happy path.
func (b *Bundle) SourceForLocalPath(p string) (sourceaddrs.Source, error) {
func (b *Bundle) SourceForLocalPath(p string) (sourceaddrs.FinalSource, error) {
// This implementation is a best effort sort of thing, and might not
// always succeed in awkward cases.

Expand Down

0 comments on commit 120227c

Please sign in to comment.