Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove <rootpath>/vendor/ prefix from vendored packages #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dimroc
Copy link

@dimroc dimroc commented Oct 25, 2018

Fixes #8


As seen here where we are using golang/dep to vendor our dependencies: smartcontractkit/chainlink#680 (comment)

Source

package store

import (
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/common/hexutil"
)

//go:generate gencodec -type Log -field-override logMarshaling -out output.go

type Log struct {
	Address common.Address `json:"address" gencodec:"required"`
	// list of topics provided by the contract.
	Topics []common.Hash `json:"topics" gencodec:"required"`
	// supplied by the contract, usually ABI-encoded
	Data []byte `json:"data" gencodec:"required"`
}

type logMarshaling struct {
	Data hexutil.Bytes
}

Before

// Code generated by github.com/fjl/gencodec. DO NOT EDIT.

package store

import (
	"encoding/json"
	"errors"

	"github.com/smartcontractkit/chainlink/vendor/github.com/ethereum/go-ethereum/common"
	"github.com/smartcontractkit/chainlink/vendor/github.com/ethereum/go-ethereum/common/hexutil"
)

...

Now

// Code generated by github.com/fjl/gencodec. DO NOT EDIT.

package store

import (
	"encoding/json"
	"errors"

	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/common/hexutil"
)

...

It has been difficult to reproduce the error in the test suite because this project does not use golang/dep to vendor dependencies.

typeutil.go Outdated Show resolved Hide resolved
@fjl
Copy link
Owner

fjl commented Feb 25, 2019

Sorry, I've been really slow catching up with GH notifications. I don't think this is a good solution. We should try to remove the use of goimports instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants