-
Notifications
You must be signed in to change notification settings - Fork 724
Setup AnyCpu, uncheck prefer 32-bit as platform target #1118
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
Conversation
Good question. I'm in favor of setting git-tfs to be "Any CPU", and #619 did that. But #1019 changed it back to "x86", because of checkin policies that are built as x86. I'm interested to hear if this fixes #1117. That said, git-tfs shouldn't be using that much memory, and there probably is another fix that would make git-tfs work in x86 mode. |
HI @spraints, thanks for the feedback ! When doing the pull requests all checks passed so hopefully it is all good :) I do agree that there is probably something that could reduce memory consumption however this is not something I have the time to fix. However I realize that there might be tons of things about the code I have not considered so if there are any negative side effects please let me know! I will get back to you regarding #1117, cloning is still in progress. |
#1117 was resolved by these changes |
&
@JensNordenbro So, I don't know what we should do.... |
@pmiossec - you make me confused. Is there anything I can do to proceed or is this a matter of changing/disabling the checkin-policy that is neccessary? |
@EdorianDark , did you try out my fork? |
@JensNordenbro No, but I am certain, that it would solve the problem. |
@pmiossec, do you have any comment to our questions? I would accept a reject but it would be nice to get a definitive reject or directions for approval (aside from the merge from master). |
We have 2 possibilities :
I think we should look around playing with the 32bit flag like described in this post: Perhaps providing 2 exe, one with the flag on and one with the flag off. That requires some tests... |
Some other options:
My personal preference is to ship only one exe, because I think it makes for a better UX. In this case, shipping two exes is probably the best experience. I think I'd make |
These TFVC policies you talk about @pmiossec ; are they failing because of rule forbidding Any Cpu or is it some technical reason that breaks all checkin-policy rules? |
Very good summary of my point of view. I am perfectly in line with that point of view. The only choice remaining is which one will be the default. I can't make a choice. I don't know which one will annoy the less people... (and test if
When there are checkin policies defined on the server, the TFS client assemblies try to load client assembies to do the checkin. But at the moment, these assemblies are only provided as x86 by Microsoft. I think that there are not a lot of user in this case nor ones encountering the OutOfMemory Exception. Anyway, please change all the projects as "AnyCPU", we will figure it out later for the flag... |
VS runs (or used to) as x86. So checkin policies would always run as x86. A pure .NET DLL that's built as x86 or as AnyCPU would run fine in this scenario. Problems happen if the policy DLL is x86 and git-tfs is AnyCPU.
Ugh, really? If MS is still distributing DLLs as x86, then my vote is that git-tfs should default to running in x86 mode. I think my vote is that git-tfs should default to running in x86 mode anyway. I guess we could be clever and run AnyCPU for everything, and the run an x86 shim exe to do checkins? |
Closing due to #1138 |
Tried it. I had been having repeated out-of-memory errors while trying to clone a large TFS repo (resulting git repo: ~5GB, packed), and no longer had any using this build. |
This is an incomplete pull request regarding the bug #1117 that I encountered. Before completing this for all different Visual Studio versions etc I would like some input if a complete pull request in the line of these changes would be acceptable.
The unit-tests all work .
The changes makes sure git-tfs.exe will adapt to the architecture of the host shell. By doing this the command line can run in 64-bit mode, hence more memory should be available for the git-tfs process.
I think regardless if #1117 is fixed or not by this is a correct approach to the tool, what do you think?
(I am test runing as I type but it will take time)