-
Notifications
You must be signed in to change notification settings - Fork 412
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
symlinked /mockery to /usr/local/bin #279
Conversation
Curiosity: Why would you call go generate from within |
@blaggacao |
Got that, thanks, bu I lack behind on how |
It allows Otherwise I would have to give > //go:generate /mockery -name=MockedInterface
< //go:generate mockery -name=MockedInterface This breaks usability for MacOS systems, having |
I think the part I don't understand is "AND from the docker image." How would Or rephrased, how do you execute I think the (somewhat) intended use is Is that what you rather try to do? Or am I simply not seeing something? |
This allows PATH_ARGS=${PATH_ARGS:-./...}
docker run --rm -v "$PWD:/src" -w "/src" \
--entrypoint go vektra/mockery:v2 generate $PATH_ARGS I overrode the |
Ok, got it, fair enough, one can do that. But I'd argue some go generate commands out there might assume some kind of an environment which |
Then I'd argue in moving the binary to a place where it is commonly found/able to be symlinked on unix systems such as
I think that responsibility is on the implementer of said go generate code to curtail (me in this case). It would be my responsibility to deal with wrong assumptions from using system |
If that's currently the case, it seems like an addressable ux bug to me... Maybe there is an option to provide appropriate symlinks? |
If you're thinking of adding symlinks to macOS root, sadly that's not feasible at the moment :(: https://github.com/NixOS/nix/pull/3628/files
|
Oh, now we nailed it down! Cool! The proposed change of this PR than LGTM Btw there is another issue when using docker #280 |
Alternatively, it might serve you better if brew wouldn't install |
I can wait to merge those changes then.
I'm not sure if I understand the statement. On macOS, brew cannot do so even if it tried. |
@mkatychev can you confirm #280 is sufficient for you? This runs a |
@LandonTClipp Just built it locally and confirmed that the behaviour remained the same for the final docker step. |
@mkatychev could you rebase off master and squash your commits. Once that's done I'll merge. |
Never mind I'm merging this now. |
Hi @LandonTClipp do you know when the next tagged docker image will be realeased? Current |
@mkatychev I tried to tag it last weekend but was having issues with Travis, I will try again this weekend. Sorry for the delay, typically very busy on weekdays. |
@LandonTClipp Thank you for the update. Please take your time, I appreciate the time you put into this project. |
@mkatychev the docker image failed to build: https://travis-ci.org/github/vektra/mockery/jobs/697811596
|
Strange, I will take a look at this as soon as I can. |
I think this was an error introduced in #278, might have nothing to do with this PR. I'll take a look this weekend as well, I think it's just something simple. |
I fixed the deployment, it's all published now. |
@LandonTClipp Just a heads up, latest docker image still has the bin in root: |
Fixed it, sorry the tagging got messed up.
|
Fantastic, it works great now! |
A lot of the code I maintain depends on using
go generate
to create our mockery code with this pattern://go:generate mockery -name=MockedInterface
/go/bin
ensures thatgo generate
will work regardless whethermockery
is called from a local installation or the docker container.