migrate from gppkg.in/yaml to go.yaml.in/yaml #5968
+14
−9
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.
Migrated all Go modules in the azure-dev project from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 (version 3.0.4), following the recommended migration path after the gopkg.in lock in April 2024.
Files Updated:
Go Source Files (5 files):
azd_yaml_schema.go - Updated import statement
extension_schema.go - Updated import statement
extension_schema_test.go - Updated import statement
init.go - Updated import statement
parse.go - Updated import statement
Go Module Files (3 modules):
go.mod - Main module
Added: go.yaml.in/yaml/v3 v3.0.4 (direct dependency)
Moved gopkg.in/yaml.v3 v3.0.1 to indirect (transitive dependency from gopkg.in/dnaeon/go-vcr.v3)
go.mod
Added: go.yaml.in/yaml/v3 v3.0.4 (direct dependency)
Kept gopkg.in/yaml.v3 v3.0.1 as indirect (transitive dependency)
go.mod
No direct yaml dependency (only has gopkg.in/yaml.v3 as transitive dependency)
Verification Completed:
✅ All Go source files updated to use go.yaml.in/yaml/v3
✅ All modules verified successfully
✅ Build completed successfully
✅ Tests passing (including previously failing yaml-related tests)
✅ Code formatted with gofmt
✅ No compilation errors
Key Notes:
The correct import path is go.yaml.in/yaml/v3 (with /yaml/ in the path)
The new version is v3.0.4, which is compatible with the existing code
gopkg.in/yaml.v3 remains as an indirect dependency due to the gopkg.in/dnaeon/go-vcr.v3 package dependency, which is acceptable
All yaml parsing functionality works correctly with the new package
The migration is complete and all code is functioning properly with the new yaml library!
fix: #5970