Load configs from absolute paths, if relative path fails #2033
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.
Why?
Now we always assume that config path is relative which limits the usability hugely.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes across various
go.modfiles and oneconfig.gofile primarily aim to introduce and utilize thego.uber.org/multierrpackage. This facilitates better error handling by allowing the aggregation of multiple errors into a single error object. In the specific case ofconfig.go, when attempting to read configuration files, both the default path and an absolute path are tried, and errors from both attempts are combined if both fail. This approach ensures more robust error reporting and handling, particularly in scenarios where configurations might be loaded from different locations.What
framework/.changeset/v0.10.11.mdframework/components/dockercompose/go.modgo.uber.org/multierr v1.11.0to the module's dependencies.framework/components/dockercompose/go.sumgo.uber.org/multierr v1.11.0.framework/components/fake/go.modgo.uber.org/multierr v1.11.0to the module's dependencies.framework/components/fake/go.sumgo.uber.org/multierr v1.11.0.framework/config.gomultierr.Append.framework/examples/myproject_cll/go.modgo.uber.org/multierr v1.11.0to the module's dependencies.framework/examples/myproject_cll/go.sumgo.uber.org/multierr v1.11.0.framework/go.modgo.uber.org/multierr v1.11.0to the module's dependencies.framework/go.sumgo.uber.org/multierr v1.11.0.