Skip to content

Winpty doesn't appear to work with devenv #899

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

Closed
1 task done
zolem opened this issue Sep 23, 2016 · 15 comments
Closed
1 task done

Winpty doesn't appear to work with devenv #899

zolem opened this issue Sep 23, 2016 · 15 comments
Labels

Comments

@zolem
Copy link

zolem commented Sep 23, 2016

  • I was not able to find an open
    or closed issue
    matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.10.0.windows.1
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.10586]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
$ cat /etc/install-options.txt
Path Option: Cmd
SSH Option: OpenSSH
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

    I am using git-bash inside conemu normally. This also happens in just default git-bash.exe though.

  • What commands did you run to trigger this issue?

$ devenv -build debug [path to solution file]

I also tried with winpty because I assumed that Mintty just could not read the information.

$ winpty devenv -build debug [path to solution file]
  • What did you expect to occur after running these commands?
    I was expecting to see the output of the build. I can see the output just fine in cmd.exe and git-cmd.exe.
  • What actually happened instead?
    Nothing is printed to the screen
@zolem zolem changed the title git version 2.10.0.windows.1 Winpty doesn't appear to work with devenv Sep 23, 2016
@landstander668
Copy link

This is just a wild guess, but have you tried setting MSYS_NO_PATHCONV (with or without winpty)?

$ MSYS_NO_PATHCONV=1 devenv -build debug [path to solution file]

@zolem
Copy link
Author

zolem commented Sep 23, 2016

@landstander668 Both appeared to build but still no output.

As a side note I can't get winpty to work for interactive ruby either. It does work with python just fine.

@dscho
Copy link
Member

dscho commented Sep 23, 2016

winpty -build debug [path to solution file]

Maybe

winpty devenv -build debug [path to solution file]

works.

@dscho dscho added the unclear label Sep 23, 2016
@zolem
Copy link
Author

zolem commented Sep 23, 2016

@dscho sorry that was a typo. That is the command I actually used. Updated my original post.

@fourpastmidnight
Copy link

fourpastmidnight commented Sep 23, 2016

FWIW, a few colleagues and I just use msbuild from within git-bash to build a VS solution and it works quite well; this includes running any unit tests.

@PhilipOakley
Copy link

From: Craig E. Shea
FWIW, a few colleagues and I just use msbuild from with git-bash to build a VS solution and it works quite well; this includes running any unit tests.


Craig,

Could you give a little bit more info on how to created the whole Git project? Did you have to build it from scratch, or create a script that gatheered everything together, or whatever.

I'm interested, as I never quite completed the msvc-build script (which generates a complete .sln/.vcproj set) to the point of doing the post-build step. Though an inspiration this week was just to do that as an independent script, rather than trying to inject the post build into the .vcproj files.

see #256 for the msvc-build fixes to the one on contrib/.

does it link with @jeffhostetler 's work #773 ?

Philip

@fourpastmidnight
Copy link

@PhilipOakley I didn't see anything in this issue to suggest the OP was trying to build Git for Windows using VS. All I read is that they're trying to use devenv to build a (any) solution, which is what lead to my comment. Nowhere is building Git for Windows mentioned, just that winpty doesn't seem to show devenv output.

So if this post is really about building Git for Windows using VS, then my comment is not applicable and I am actually eagerly awaiting the ability to do just that! I apologize for any confusion.

@PhilipOakley
Copy link

Hi Craig,

my question didn't quite read right when I saw in in the global reply.

I'd see you mention that you had used "msbuild" to build the Git project and were suggesting that it may be an option for the OP.

My question was actually back to yourself to see if I could get a little more info about how you used the "msbuild".

I wasn't aware of 'msbuild' .. though google now tells me it came in with VS2015.

Sorry for any confusion.

----- Original Message -----
From: Craig E. Shea
To: git-for-windows/git
Cc: Philip Oakley ; Mention
Sent: Saturday, September 24, 2016 2:38 PM
Subject: Re: [git-for-windows/git] Winpty doesn't appear to work with devenv (#899)

@PhilipOakley I didn't see anything in this issue to suggest the OP was trying to build Git for Windows using VS. All I read is that they're trying to use devenv to build a (any) solution, which is what lead to my comment. Nowhere is building Git for Windows mentioned, just that winpty doesn't seem to show devenv output.

So if this post is really about building Git for Windows using VS, then my comment is not applicable and I am actually eagerly awaiting the ability to do just that! I apologize for any confusion.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@fourpastmidnight
Copy link

@PhilipOakley Lol, I think we both got our wires crossed here. I had no idea this issue was specifically about building Git and/or Git for Windows with devenv; rather, I took this issue to be the OP was trying to build any solution using VS on the command line from a BASH shell. Again, I apologize for the confusion.

For more information, my colleagues and I build a C#-based solution using msbuild invoked from the BASH shell. Again, this issue, to me, didn't seen to explicitly state that Git or Git for Windows was trying to be built in this manner.

@zolem
Copy link
Author

zolem commented Sep 26, 2016

No I am only trying to build any solution. I just can't get the output to display with winpty or without. The build appears to run as normal there is just no output displayed.

@fourpastmidnight
Copy link

Well, my colleague wrote the following git alias script to build a VS solution from git-bash using MSBuild, so hopefully you will find this helpful:

$ git config --global alias.build '! f() { MSBuild.exe "$@" | tail -6; }; f'

In order for this to work, make sure msbuild.exe is on your PATH or substitute with the absolute path to MSBuild. Also, if you don't want to tail the build output, then just remove the pipe to tail. To use it, simply cd to the directory containing the solution you want to build and issue git build and you should be good to go. By default (IIRC), MSBuild will first look for a VS solution file and build that. Of course, if you need to provide other arguments to MSBuild, the alias also supports that.

HTH.

@zolem
Copy link
Author

zolem commented Sep 27, 2016

@fourpastmidnight This is pretty cool and does indeed print output. Do you know what the difference is between msbuild and devenv? I am pretty sure devenv uses visual studio to build I don't know anything about msbuild. The problem is that devenv succeeds in building while msbuild has errors and fails. Obviously something is different about the two and at the moment msbuild probably won't work for me but I will keep that solution in mind for future projects.

@zolem
Copy link
Author

zolem commented Sep 27, 2016

So I decided to google what people using cygwin do to get output from devenv. The problem apparently was that devenv.exe does not produce stdin/stdout stuff. If I use devenv.com everything works perfectly even without winpty. Thanks for all your help guys. Here is a link to the solution I found: http://stackoverflow.com/questions/1046660/how-to-build-a-visual-studio-9-0-solution-from-cygwin-and-get-build-output

Not sure how to force git-bash to prioritize .com over .exe. Seems like this is the default in windows and maybe git-bash should do the same thing.

@zolem zolem closed this as completed Sep 27, 2016
@fourpastmidnight
Copy link

@zolem Glad you found a solution! So, devenv is Visual Studio. And there are slight differences in the way Visual Studio builds (some?, all?) solutions/projects compared to running MSBuild directly. I'm not sure what those differences might be. Maybe build order? Or something else? I don't know. Anyway, it's worked for my colleagues and I, but I guess YMMV. Anyway, again, I'm glad you found something that solves your immediate problem.

@landstander668
Copy link

@zolem In the meantime, adding alias devenv=devenv.com to your .bash_profile/.bashrc should make the workaround relatively seamless.

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

No branches or pull requests

5 participants