mono / ngit

Automated jgit port to c#
261 stars 152 forks source link

Replaced hard dependencies with nuget packages to allow Win build #73

Open dougrathbone opened 9 years ago

dougrathbone commented 9 years ago

A basic clone of the repository wouldn't build on windows without mono, or local copies of ICSharpCode.SharpZipLib installed.

I replaced these with nuget references to make windows source contribution easier.

xied75 commented 8 years ago

:+1: Found the same problem today. Given this is "N"git therefore it should fit the Windows world view. In Windows nuget is the king. All dependences should be specified in package file and once people clone this repo and open it with VS, all we need to compile is right click Solution and click "Restore NuGet Packages". Can't see any reason to not merge the PR.

@Therzok opinions?

Edit:

Looks like the PR is a bit old, not reflecting the current status. @dougrathbone would you mind to update your PR, or if you are busy I can make a similar one targeting current master.

alanmcgovern commented 8 years ago

If i remember correctly, Mono.Posix is a platform specific binary which requires libmonoposixhelper.so/libmonoposixhelper.dylib in order to function. Putting it in a nuget is just going to cause a mountain of problems should people expect the result to function correctly.

xied75 commented 8 years ago

Hi, Alan,

You sure have a point. But I kind of see these are separated issues. I read some of those old issues on the repo and understood that you want to keep the Code 'pure and clean' to the jgit, thus you avoid doing anything unnecessary to bring more burden when tracking the upstream.

Traditionally MS stack developers are very bad at doing open source, (might still be like that today.) Yet the open source world is much more dynamic and vibrant so when you got git, you then got people to create libgit, then libgit2, then jgit, etc. So they have lots of choice, and that's a positive feedback loop, which is lacking in the MS world.

I believe this will change gradually given MS now open sourced .net. I for one is willing to copy what the open source guys are doing for all these years.

I've now forked ngit into my company repo and will start to work on it. I have NO intention to keep tracking jgit anymore, once it works I'll start to trim down stuff from Sharpen and JAVA, to make it a pure C# lib, if git itself got new features, we will mirror that directly with C# thinking, rather than bother what jgit does.

Hopefully this won't take half a century to accomplish. :)

alanmcgovern commented 8 years ago

If you want to allow windows developers to more easily compile ngit, a better approach would be to ifdef/remove the code which requires Mono.Posix. Shipping a nuget which does not function isn't a great idea. The problem changes from "install this dependency before you can compile" to "hack up the build in a hard-to-maintain way in order to have something which does not crash immediately when you use it".

xied75 commented 8 years ago

Hi Alan,

I wasn't forking the repo to do just that. I need to make ngit work under Universal Windows App. Regarding the posix I'll see if I can replace that with better solutions later. Best.

CumpsD commented 8 years ago

Besides being able to clone and build, if I want to use NGit as a dependency, is there an up to date and working NuGet package to actually use now?