Skip to content

chore(deps): replace mitchellh/mapstructure with go-viper/mapstructure/v2#450

Merged
mathieu-benoit merged 1 commit intoscore-spec:mainfrom
Abhishek9639:fix/443
Apr 8, 2026
Merged

chore(deps): replace mitchellh/mapstructure with go-viper/mapstructure/v2#450
mathieu-benoit merged 1 commit intoscore-spec:mainfrom
Abhishek9639:fix/443

Conversation

@Abhishek9639
Copy link
Copy Markdown
Contributor

Description

Swap out the archived mitchellh/mapstructure for the maintained go-viper/mapstructure/v2 fork, and bump score-go to v1.13.0 which already has the same migration done.

Changes:

  • Updated the import in internal/provisioners/templateprov/template.go.
  • Replaced mitchellh/mapstructure with go-viper/mapstructure/v2 in go.mod.
  • Bumped score-go from v1.12.1 to v1.13.0.
  • Ran go mod tidy.

What does this PR do?

mitchellh/mapstructure is archived and no longer maintained. This replaces it with the actively maintained fork, following the plan discussed in #443 and after the same change was already merged in score-go (score-spec/score-go#176).

The indirect deps (copystructure/reflectwalk) are still pulled in through Masterminds/sprig that'll be handled separately as discussed in #443.

Types of changes

  • New chore (expected functionality to be implemented).

Checklist:

  • I've signed off with an email address that matches the commit author.

@Abhishek9639
Copy link
Copy Markdown
Contributor Author

Hi @mathieu-benoit,
Opened the score-compose PR with the mapstructure migration and the score-go v1.13.0 bump.
Let me know if anything needs to be changed.
Thanks

@mathieu-benoit mathieu-benoit self-requested a review April 7, 2026 14:08
@Abhishek9639
Copy link
Copy Markdown
Contributor Author

Hi @mathieu-benoit,
The test-container check is failing because Docker Hub secrets aren't available for fork PRs. The other checks (test-code, test-multi-arch-build) are passing. Could you re-run this check from your end or let me know if there's something else I should do?
Thanks

@mathieu-benoit
Copy link
Copy Markdown
Contributor

mathieu-benoit commented Apr 8, 2026

@Abhishek9639, yes exactly, nothing related to what you did, I tested something and just rolled it back. No worries. Continuing my review and tests.

…e/v2

Replace the archived mitchellh/mapstructure with the maintained go-viper/mapstructure/v2 fork and bump score-go to v1.13.0 which includes the same migration.

Signed-off-by: Abhishek <abhishekup082@gmail.com>
Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Quick diff between this new version and current latest in terms of packages with Docker Scout, all good!

    -    1 packages removed  
    ⎌    4 packages changed (↑ 3 upgraded, ↓ 1 downgraded)  
        50 packages unchanged
  
     Package                                Type    Version                                  Compared Version  
  
  ↑  github.com/compose-spec/compose-go/v2  golang  2.10.2                                   2.10.1            
  -  github.com/mitchellh/mapstructure      golang                                           1.5.0             
  ↑  github.com/olekukonko/tablewriter      golang  1.1.4                                    1.1.3             
  ↓  github.com/score-spec/score-compose    golang  0.0.0-20260408004047-6fc785e66453+dirty  0.36.5            
  ↑  github.com/score-spec/score-go         golang  1.13.0                                   1.12.1

@Abhishek9639
Copy link
Copy Markdown
Contributor Author

Rebased on latest main to pick up the CI fix from #452. Force-pushed to keep the branch clean.

@mathieu-benoit mathieu-benoit merged commit e38ee36 into score-spec:main Apr 8, 2026
8 checks passed
@Abhishek9639
Copy link
Copy Markdown
Contributor Author

Thanks for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mitchellh/copystructure, mitchellh/mapstructure and mitchellh/reflectwalk are now archived and not anymore maintained, what to do with that?

2 participants