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

Builds Fail with 1.5.0 of subosito/gotenv #1600

Closed
3 tasks done
arhea opened this issue Aug 15, 2023 · 4 comments
Closed
3 tasks done

Builds Fail with 1.5.0 of subosito/gotenv #1600

arhea opened this issue Aug 15, 2023 · 4 comments
Labels
kind/bug Something isn't working

Comments

@arhea
Copy link

arhea commented Aug 15, 2023

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.
  • I have checked the troubleshooting guide for my problem, without success.

Viper Version

1.16.0

Go Version

1.20

Config Source

Environment variables

Format

Dotenv

Repl.it link

No response

Code reproducing the issue

No response

Expected Behavior

Package to build.

Actual Behavior

/go/pkg/mod/github.com/spf13/viper@v1.16.0/internal/encoding/dotenv/codec.go:51:33: cannot use &buf (value of type *bytes.Buffer) as gotenv.Reader value in argument to gotenv.StrictParse: *bytes.Buffer does not implement gotenv.Reader (missing method ReadAt)
failed to build, error: exit status 1

Steps To Reproduce

  1. Upgrade dependencies of project resulting in subosito/gotenv v1.5.0
  2. Error message listed above.
  3. Adding replace github.com/subosito/gotenv => github.com/subosito/gotenv v1.4.2 to go.mod, builds succeed.

Additional Information

subosito/gotenv#27

@arhea arhea added the kind/bug Something isn't working label Aug 15, 2023
@github-actions
Copy link

👋 Thanks for reporting!

A maintainer will take a look at your issue shortly. 👀

In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.

⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9

📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:

https://twitter.com/sagikazarmark/status/1306904078967074816

Thank you! ❤️

@guybarnhartmagen
Copy link

this is a duplicate of #1601

@andig
Copy link
Contributor

andig commented Aug 16, 2023

That is actually closed. Is it possible that this is a consequence of not requiring a Go version that has bytes.Buffer implement ReadAt?

@arhea
Copy link
Author

arhea commented Aug 16, 2023

It looks like the issue I opened on subosito/gotenv#27 has been resolved, thank you @subosito! As for #1601 it looks like that was created shortly after this issue (#1600), apologies for the duplicates.

I have confirmed with 1.6.0 that is working again.

I think it is safe to close this issue.

@arhea arhea closed this as completed Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants