Skip to content

run hz to generate api in windows ,fails with relativePath #107

@czyt

Description

@czyt

Describe the bug

in windows 11,when run hz update -I idl -idl idl/hello/hello.proto failed :

To Reproduce

Steps to reproduce the behavior:

  1. follow the guide in https://www.cloudwego.io/zh/docs/hertz/tutorials/toolkit/toolkit/
  2. run command hz update -I idl -idl idl/hello/hello.proto
  3. error occured.
  4. err log
F:\go\franchiserMgmt>F:\go\franchiserMgmt>hz update -I idl -idl idl/hello/hello.proto
plugin protoc_gen_hertz returns error: exit status 1, cause:
Could not make proto path relative: F:\go\franchiserMgmt\idl\hello\hello.proto: No such file or directory

idl gnerated

Screenshots

If applicable, add screenshots to help explain your problem.

Hertz version:
F:\go\franchiserMgmt>hz -v
hz version v0.1.0

Please provide the version of Hertz you are using.

Environment:

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\czyt\AppData\Local\go-build
set GOENV=C:\Users\czyt\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\czyt\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\czyt\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18.3
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=F:\go\franchiserMgmt\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\czyt\AppData\Local\Temp\go-build85752684=/tmp/go-build -gno-record-gcc-switches

Metadata

Metadata

Assignees

No one assigned

    Labels

    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions