palantir / godel

Go tool for formatting, checking, building, distributing and publishing projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for arm64 architecture

ruckc opened this issue · comments

What happened?

When trying to use godel to build a multiarch package, it fails since the godel binary downloads amd64 version instead of arm64.

$ ./godelw 
Downloading https://github.com/palantir/godel/releases/download/v2.36.0/godel-2.36.0.tgz to /home/ruckc/.godel/downloads/godel-2.36.0-1990460.tgz...
/home/ruckc/.godel/downloads/godel-2.36.0-1990460. 100%[===============================================================================================================>]  11.68M  13.6MB/s    in 0.9s    
./godelw: line 147: /home/ruckc/.godel/tmp_7gRNr8/godel-2.36.0/bin/linux-amd64/godel: cannot execute binary file: Exec format error
Version reported by godel executable did not match expected version: expected "godel version 2.36.0", was ""

What did you want to happen?

Godel to run

Yes, this is a great call-out -- this has been on the radar, but especially with the prevalence of drawin-arm64 machines I think this is particularly important. Will prioritize fixing this and rolling it out (this requires updating all of the builtin plugins and assets to build with this os/arch as well, but it is strictly the correct thing to do).

@nmiyake - i made an initial attempt to support it in godelw. Since the plugins are compiled into the godel I don't think they need to be changed.

Thanks, appreciate the contribution!

godel does resolve the defaults plugins and assets externally (the code that defines the default plugins and assets and the resolver used is at https://github.com/palantir/godel/blob/master/framework/godellauncher/defaulttasks/defaulttasks.go#L28), so those will need to be updated as well to fully support this (although updating those should be simpler since it should just be a matter of updating the dist configuration and there shouldn't need to be any changes to the wrapper script or anything).