Skip to content

replace directive in go.mod makes it harder to "go install" neo-go #3964

@roman-khimov

Description

@roman-khimov

Current Behavior

neofs-contract$ make neo-go
go install -trimpath -v -ldflags "-X 'github.com/nspcc-dev/neo-go/pkg/config.Version=0.111.0'" github.com/nspcc-dev/neo-go/[email protected]
go: github.com/nspcc-dev/neo-go/[email protected] (in github.com/nspcc-dev/[email protected]):
        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.
make: *** [Makefile:49: /home/rik/dev/neofs-contract/bin/cli] Ошибка 1

Expected Behavior

go install working fine.

Possible Solution

Some ideas:

  1. Drop "replace" and use upstream version.
  2. Switch to the local repository completely.
  3. Do not go install, rather wget github.com/nspcc-dev/neo-go/... (makes it impossible to use unreleased version)
  4. Make compiler a standalone tool.

Steps to Reproduce

Try upgrading neofs-contract to NeoGo 0.111.0.

Context

golang/go#44840
golang/go#40276

Unfortunately, there is no flag to ignore this problem (that is completely irrelevant for this case).

Regression

Yes, 0.110.0 was fine wrt this.

Your Environment

  • Version of the product used: 0.111.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS3Minimally significantU3RegularbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions