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

I got an error that 'cannot range over 3 (untyped int constant)' when building cm-beetle #134

Open
sykim-etri opened this issue Sep 27, 2024 · 2 comments
Labels
question Further information is requested

Comments

@sykim-etri
Copy link
Member

cm-beetle을 컴파일하려고 하니 아래와 같은 에러가 계속 발생하는데 혹시 원인이 무엇일까요?

~/workspace/cm-beetle(v0.2.2 U:3 ?:1 ✗) make
Generating Swagger API documentation...
2024/09/27 17:33:10 Generate swagger docs....
2024/09/27 17:33:10 Generate general API Info, search dir:./
/usr/local/go/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/usr/local/go/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/usr/local/go/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/usr/local/go/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
  • Environment
    • cm-beetle v0.2.2
@sykim-etri sykim-etri added the question Further information is requested label Sep 27, 2024
@yunkon-kim
Copy link
Member

@sykim-etri

아래 환경 및 절차로 테스트 해봤는데, 재현이 되지 않고 있습니다 ㅠ
일단 환경이 다를 수 있어 공유드립니다.

~/dev/cloud-barista/cm-beetle$ ~/go/bin/swag --version
swag version v1.16.3
~/dev/cloud-barista/cm-beetle$ go version
go version go1.23.0 linux/amd64
~/dev/cloud-barista/cm-beetle$ git status
On branch v0.2.2
nothing to commit, working tree clean
~/dev/cloud-barista/cm-beetle$ make
Generating Swagger API documentation...
2024/09/27 17:46:07 Generate swagger docs....
2024/09/27 17:46:07 Generate general API Info, search dir:./
2024/09/27 17:46:12 Generating common.SimpleMessage
2024/09/27 17:46:12 Generating common.SimpleMsg
2024/09/27 17:46:12 Generating controller.MigrateInfraRequest
2024/09/27 17:46:12 Generating model.TbMciDynamicReq
2024/09/27 17:46:12 Generating model.TbVmDynamicReq
2024/09/27 17:46:12 Generating controller.MigrateInfraResponse
2024/09/27 17:46:12 Generating model.Response
2024/09/27 17:46:12 Generating controller.RecommendInfraRequest
2024/09/27 17:46:12 Generating onprem.OnPremInfra
2024/09/27 17:46:12 Generating onprem.NetworkProperty
2024/09/27 17:46:12 Generating onprem.ServerProperty
2024/09/27 17:46:12 Generating onprem.CpuProperty
2024/09/27 17:46:12 Generating onprem.MemoryProperty
2024/09/27 17:46:12 Generating onprem.DiskProperty
2024/09/27 17:46:12 Generating onprem.NetworkInterfaceProperty
2024/09/27 17:46:12 Generating onprem.RouteProperty
2024/09/27 17:46:12 Generating onprem.OsProperty
2024/09/27 17:46:12 Generating controller.RecommendInfraResponse
2024/09/27 17:46:12 Generating recommendation.RecommendedInfraInfo
2024/09/27 17:46:12 Generating controller.GetUsersResponse
2024/09/27 17:46:12 Generating model.MyUser
2024/09/27 17:46:12 Generating controller.GetUserResponse
2024/09/27 17:46:12 Generating controller.CreateUserRequest
2024/09/27 17:46:12 Generating controller.UpdateUserRequest
2024/09/27 17:46:12 Generating controller.UpdateUserResponse
2024/09/27 17:46:12 Generating controller.PatchUserRequest
2024/09/27 17:46:12 Generating controller.PatchUserResponse
2024/09/27 17:46:12 create docs.go at api/docs.go
2024/09/27 17:46:12 create swagger.json at api/swagger.json
2024/09/27 17:46:12 create swagger.yaml at api/swagger.yaml
Generated Swagger API documentation!
Building the binary for amd64...
Build finished!

@yunkon-kim
Copy link
Member

현재 makeswag init -> build 순서로 수행되는데요. 오류는 swag init시에 발생한 것으로 파악됩니다.

all: swag build ## Default target: build the project

임시 방편으로 make run으로 빌드 및 실행은 해보실 수 있을 것 같습니다.
: (참고) make run 하면 build -> run 순서로 동작합니다.

run: build ## Run the built binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants