FiloSottile / age

A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
https://age-encryption.org
BSD 3-Clause "New" or "Revised" License
17.05k stars 500 forks source link

Age v1.1.0 fails to build with "go install" #472

Closed JerryLava closed 1 year ago

JerryLava commented 1 year ago

Environment

What were you trying to do

Attempting to install go from source using the instructions in README.md

$ go install filippo.io/age/cmd/...@latest

What happened

Go doesn't get built

go: downloading filippo.io/age v1.1.0
go: filippo.io/age/cmd/...@latest (in filippo.io/age@v1.1.0):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.
$ go version
go version go1.19.4 linux/amd64
$ go version
go version go1.19.2 darwin/arm64
alerque commented 1 year ago

I built the packages for Arch Linux form the source tarball using Go 1.19.4 with no trouble. Is this a Git clone vs. tarball vs. remote Go downloader issue?

JerryLava commented 1 year ago

It builds fine from the latest git checkout:

$ git clone https://github.com/FiloSottile/age.git
Cloning into 'age'...
cremote: Enumerating objects: 2205, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 2205 (delta 2), reused 14 (delta 2), pack-reused 2185
Receiving objects: 100% (2205/2205), 1.43 MiB | 3.87 MiB/s, done.
Resolving deltas: 100% (1288/1288), done.
$ cd age/cmd/age
$ go build
$  ./age --version
(devel)
FiloSottile commented 1 year ago

Ah, thank you, I forgot to remove the replace directive, which breaks go install, but not go build invoked from the source directory. I'll issue a v1.1.1.