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

Fix End2End test for non-windows platforms #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gjrtimmer
Copy link

Binary name for string was hardcoded to .exe

Binary name for string was hardcoded to `.exe`
@dmarkham
Copy link

dmarkham commented Apr 8, 2019

I have merged this in my new and supported version that is a drop in replacement. A long with go mod support. If your interested.
https://github.com/dmarkham/enumer

@alvaroloes
Copy link
Owner

While I agree that having a .exe file in a non-Window machine is weird, it doesn't cause any issue. If the reason for the change is purely a cosmetic matter, I would rather not add more code.

Let me know if there is any other reason. Thanks!

@gjrtimmer
Copy link
Author

@alvaroloes There is a real reason for it not cosmetic.

I'm using Windows and Linux for development. There is however a real issue for which I have submitted this.

When I develop on Windows I'm using VSCode as my IDE editor. But for my terminal / compiling I'm using WSL (Windows Linux Subsystem) ability to use a bash terminal on Windows, and Windows cmd for running / compiling the same project as Windows binaries.

I'm using this for crossplatform development. It allows me to develop for Windows and Linux and test both at the same time. My code base GOPATH is the same for my Windows and Linux. Both are using the same folder on my filesystem.

This PR was created because of the following problem.
When I'm using Windows cmd I run my Windows tests and it uses the real .exe which was compiled by Windows cmd. The enumer.exe is a Windows binary. When I use my bash console on the same Windows machine and compile it tries to use the enumer.exe (Windows compiled) binary while it should use the enumer binary in GOPATH\bin. Which causes errors and I have to manually recompile the enumer binary everything I switch between windows and linux builds.

So my GOPATH\bin looks like

  • dep
  • dep.exe
  • enumer.exe
  • go1.10.8
  • go1.10.8.exe
  • gocode
  • gocode.exe
  • godef
  • godef.exe
  • golangci-lint
  • golangci-lint.exe
  • gomodifytags
  • gomodifytags.exe
  • go-outliner
  • go-outliner.exe
  • goplay
  • goplay.exe
  • goreturns
  • goreturns.exe
  • gotests
  • gotests.exe
  • impl
  • impl.exe
  • dlv
  • dlv.exe
  • fillstruct
  • fillstruct.exe
  • go1.11.9
  • go1.11.9.exe
  • gocode-gomod
  • gocode-gomod.exe
  • godoctor
  • godoctor.exe
  • golint
  • golint.exe
  • go-outline
  • go-outline.exe
  • gopkgs
  • gopkgs.exe
  • gorename
  • gorename.exe
  • go-symbols
  • go-symbols.exe
  • guru
  • guru.exe

I hope this makes sense and clarifies for you why I need it.
Crossplatform development without this PR is quite frustrating.

I really hope you will consider this PR.

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