qur / withmock

Automatic Go package mock generation tool
Other
71 stars 9 forks source link

Fails for packages with "internal" imports #57

Open sandlerben opened 8 years ago

sandlerben commented 8 years ago

Steps to reproduce:

  1. go get https://github.com/hack4impact/audio-transcription-service
  2. cd $GOPATH/src/github.com/hack4impact/audio-transcription-service
  3. git checkout 0b860e525f69e9a5aea82a52a0040faf34503ed9
  4. mocktest -work ./...

Expected:

Actual:

ERROR: Failed to install '_et/http': exit status 1
output:
package _et/http
    imports internal/golang.org/x/net/http2/hpack: use of internal package not allowed

What might be the problem?

I took a look at the temporary work directory and the file at path/src/_et/http/http_ifmocks.go has the following import:

import (
    ...
    hpack "internal/golang.org/x/net/http2/hpack"
)

I think the error is one of two things:

However, I do not have a very good idea of what the problem is. I would appreciate if someone could clarify if I did something wrong or if there is a bug with withmock.

sandlerben commented 8 years ago

@qur have you gotten a chance to look at this?