jangler / oracles-randomizer

Randomizer for Zelda: Oracle of Seasons and Oracle of Ages
MIT License
77 stars 19 forks source link

Go generate failing #145

Closed Berserker66 closed 4 years ago

Berserker66 commented 4 years ago

Followed the instructions https://github.com/jangler/oracles-randomizer/blob/master/doc/contributing.md on a windows 10 computer and when running go generate I get:

panic: error getting import path from working directory

goroutine 1 [running]:
main.generateMain()
        E:/ROMS/Randomizer/Oracles/generate/generate.go:55 +0x18b
main.main()
        E:/ROMS/Randomizer/Oracles/generate/generate.go:43 +0x27
exit status 2
generate.go:8: running "go": exit status 1
ReggX commented 4 years ago

You did not follow the instrcutions correctly.

The git repo should be located in $GOPATH/src/github.com/jangler/oracles-randomizer, not E:/ROMS/Randomizer/Oracles/

generate.go requires strict adherence to the path naming convention.

Berserker66 commented 4 years ago
E:\ROMS\Randomizer\Oracles>go get github.com/jangler/oracles-randomizer
# github.com/jangler/oracles-randomizer
runtime.main_main·f: function main is undeclared in the main package

E:\ROMS\Randomizer\Oracles>cd $GOPATH/src/github.com/jangler/oracles-randomizer
The system cannot find the path specified.
ReggX commented 4 years ago

Did you set up your GOPATH correctly?

https://github.com/golang/go/wiki/SettingGOPATH

Berserker66 commented 4 years ago

image

ReggX commented 4 years ago

oh yeah, Windows environment variable handling...

Try cd /d %GOPATH%/src/github.com/jangler/oracles-randomizer instead

Berserker66 commented 4 years ago

I got there manually. I'm using GoLand anyway, so I had to navigate there anyway.

First time dealing with a Go program, so I don't know if that's convention. But the strict path location requirement feels wrong.

jangler commented 4 years ago

The go generate code that runs for the randomizer assumes the path to the repository matches github.com/(.+)/oracles-randomizer, since a properly configured Go environment would place it there.