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

[BUG]golang环境是否有要求?1.15 不能运行 #191

Closed
richardJiang opened this issue Nov 9, 2021 · 7 comments · Fixed by #198
Closed

[BUG]golang环境是否有要求?1.15 不能运行 #191

richardJiang opened this issue Nov 9, 2021 · 7 comments · Fixed by #198
Assignees
Labels

Comments

@richardJiang
Copy link
Contributor

richardJiang commented Nov 9, 2021

    github.com/apolloconfig/agollo/v4 imports
    github.com/apolloconfig/agollo/v4/utils/parse/yaml imports
    github.com/spf13/viper imports
    github.com/spf13/afero tested by
    github.com/spf13/afero.test imports
    testing/fstest: package testing/fstest is not in GOROOT (C:\go1158\src\testing\fstest)

使用go mod 管理之后提示这个错误

go version 1.15.8
agollo version v4.0.9

@richardJiang
Copy link
Contributor Author

spf13/viper#1161
same issure

@zouyx
Copy link
Member

zouyx commented Nov 18, 2021

应该是没有要求,但我看是如果 1.15 的话,需要 upgrade 到 1.15.10+

@richardJiang
Copy link
Contributor Author

viper 里面使用的方法已经超前到了1.16了

@zouyx
Copy link
Member

zouyx commented Dec 3, 2021

viper 里面使用的方法已经超前到了1.16了

https://github.com/zouyx/agollo_demo/runs/4403694463?check_suite_focus=true

我刚刚用 1.13 试了下,当前4.0.9 也是没问题喔

@richardJiang
Copy link
Contributor Author

我通过升级搞定的,如果现在没有我就关掉吧

@zouyx
Copy link
Member

zouyx commented Dec 7, 2021

我还想了解下,viper 是 agollo 引进来的吗?还是有组件引进来的,go mod graph 看看?

@richardJiang
Copy link
Contributor Author

richardJiang commented Dec 8, 2021

module github.com/apolloconfig/agollo/v4

require (
	github.com/spf13/viper v1.8.1
	github.com/tevid/gohamcrest v1.1.1
)

go 1.13

这个是agollo的go mod 可以看到使用的viper是1.8.1

viper@1.8.1 里面引用了

github.com/spf13/afero v1.6.0

然而在 afero v1.6.0这个里面可以看到以下代码。

package afero

import (
	"bytes"
	"errors"
	"io"
	"io/fs"
	"os"
	"testing"
	"testing/fstest"
	"time"
)

其中 import "testing/fstest" 这个包

然而 "testing/fstest" 这个包是go 1.16 才有的。1.15升级根本没用

@zouyx zouyx linked a pull request Dec 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants