fix darwin-arm64 generated go-bindata #44
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now master is broken for macs with arm64:
Its a combination of 2 issues:
Outdated go-bindata
RestoreAsset is clearly missing from
bash_darwin_arm64.go
. I tried to reproduce the same file, but couldn't get even close to it.after running
make bash
all other os/arch combination was almost identical (except from timestamp):but
bash_darwin_arm64.go
was somehow really different. I started to chase down how it could happened. Because go-basher was created before go modules,go-bindata
was installed by good oldgo get
:But this way go-bindata version was never pinned to an exact version (git commit) just something happend to be on the environment where
make bash
was run.First of all there are different
go-bindata
package is used in the roo and in the example dir:go-basher/Makefile
Line 13 in b631c07
go-basher/example/Makefile
Line 3 in b631c07
Which one is the correct? Unfortunately both of them are
archived
, but there is ahttps://github.com/go-bindata/go-bindata fork which is still alive and even made go mod compatible.
I stared to
git bisect
to find the exact version was used and found:Actually it was tagged as
v3.0.7
, but if you callgo-bindata -version
its annoyingly always sayv3.1.0
as they forgot to updatego-bindata/version.go
(wtf)So I used
github.com/go-bindata/go-bindata
which does has av3.1.3
tag, but it doesn't follows go's recommendation:So right now
make deps
could use:go install github.com/go-bindata/go-bindata/v3/...@v3.1.3
Makefile copy paste error:
If you check the 2 last line in Makefile's
bash
targetgo-basher/Makefile
Lines 39 to 40 in 43d5d65
Line 39. supposed to generate the
arm64
version, but: tags, prefix and input dir doesn't matches.