Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused package spf13/viper and dependencies from vendor, etc. #4908

Merged
merged 1 commit into from
May 15, 2023

Conversation

gilbertsoft
Copy link
Member

@gilbertsoft gilbertsoft commented May 12, 2023

The Issue

The usage of package github.com/spf13/viper was removed with f24e8e5 6 years ago but one line was forgotten which had no effect anymore.

How This PR Solves The Issue

This PR removes that last line and the package with its dependencies.

Manual Testing Instructions

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

@gilbertsoft gilbertsoft requested review from a team as code owners May 12, 2023 20:45
@github-actions
Copy link

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

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

Sure looks good to me! Amazing.

@gilbertsoft
Copy link
Member Author

Sure looks good to me! Amazing.

Reduces the binary size for almost 2MB :)

@rfay
Copy link
Member

rfay commented May 12, 2023

That's weird, the binary shouldn't have been affected, but I guess because of that one single use!

@gilbertsoft
Copy link
Member Author

That's weird, the binary shouldn't have been affected, but I guess because of that one single use!

Yes it does, that's a known problem of Viper. In our case not that big because we already import some dependencies which Viper would do. See also https://github.com/knadh/koanf#alternative-to-viper and https://github.com/knadh/koanf/wiki/Comparison-with-spf13-viper

@rfay
Copy link
Member

rfay commented May 13, 2023

Thanks for this! Is it going to mess up your vendor dir for the amplitude patch? Almost pulled, then thought about that. Would you rather do it after that goes in?

@mattstein mattstein removed the request for review from a team May 15, 2023 15:09
@gilbertsoft
Copy link
Member Author

Thanks for this! Is it going to mess up your vendor dir for the amplitude patch? Almost pulled, then thought about that. Would you rather do it after that goes in?

No, should do any harm. You can merge at any time.

@rfay rfay changed the title Remove not used package spf13/viper and dependencies Remove unused package spf13/viper and dependencies from vendor, etc. May 15, 2023
@rfay rfay merged commit 254573f into ddev:master May 15, 2023
16 of 17 checks passed
@rfay rfay deleted the task/remove-viper branch May 15, 2023 20:32
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.

None yet

2 participants