Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

v1.0.1 introduces breaking changes #166

@JeremyLoy

Description

@JeremyLoy

The latest release of v1.0.1 broke our CI builds. It seems that Mockgen no longer honors the vendor folder, and instead only looks in your GOROOT and GOPATH.

Usage (go generate command at the top of a source file):

//go:generate mockgen -source=file.go -package mypackage -destination file_mock.go

file.go imports bcrypt

Example error message (bcrypt exists in the vendor folder):

2018/04/04 10:35:52 failed to import package by path golang.org/x/crypto/bcrypt: cannot find package "golang.org/x/crypto/bcrypt" in any of:
        /usr/local/opt/go/libexec/src/golang.org/x/crypto/bcrypt (from $GOROOT)
        /Users/me/.go/src/golang.org/x/crypto/bcrypt (from $GOPATH) - fallback to import path suffix

Rolling back to v1.0.0 resolves the issue (using something like retool or manually checking out and building mockgen from source)

Here is a diff of v1.0.0 to v1.0.1. It seems like a lot more was done than just a 'patch' according to semantic versioning as new features were added.

v1.0.1 should really be v1.1.0.

If no longer honoring the vendor folder is intentional v1.0.0 should be marked v2.0.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions