Skip to content

Conversation

jeffhostetler
Copy link
Contributor

These changes introduce a "LocalDev" version of the build/solution/project files that support using a locally-built debug version of LibGit2 while maintaining the overall structure of the existing NuGet-based scripts. The goal here is to make it easier for a developer to work and debug at all 3 levels (App, LG2#, and LG2).

With these changes you can easily build and run the unit tests from the command line (using the new build.libgit2sharp.LocalDev.cmd script) and from VS (using the new LibGit2Sharp.LocalDev.sln).

Full details are provided in the new ./LocalDev/README.txt.

TODO I have only built this on Windows. I don't know if the other platforms need or have interest in something like this or not.

@bording
Copy link
Member

bording commented Sep 23, 2015

@nulltoken will have to make the final call on this, but this seems to be reintroducing a lot of stuff that was intentionally moved to the NativeBinaries repo. Putting this stuff back here now introduces a good bit of duplication that that would need to be maintained in two places.

@ethomson
Copy link
Member

Well, perhaps, but the current solution has created a number of problems that need solving. Namely:

  1. I want to use LibGit2Sharp without the public nuget packages. I've reengineered my build system to emit libgit2 in a nuget package in the same way as LibGit2Sharp expects, which was obnoxious, but it's done. Now what do I do with it? Ideally, I would just check this new version into my LibGit2Sharp repository. See Include nuget.config for custom native nupkg #1181.
  2. If I'm hacking on libgit2, I need a tight loop from code -> build -> use in LibGit2Sharp. I absolutely don't want to build a nuget package to do it. The best guidance seems to be to copy the new libgit2 into the nuget package's restored location. This is the problem that this PR seems to be addressing.

I had pondered if (2) were also solveable with an environment variable or something pointing to the path to load the binary from.

@Therzok
Copy link
Member

Therzok commented Sep 23, 2015

I had pondered if (2) were also solveable with an environment variable or something pointing to the path to load the binary from.

Probe env var and fallback to nuget? ❤️

@ethomson
Copy link
Member

Probe env var and fallback to nuget? ❤️

Yeah - agreed that any solution should be to fall back to nuget so that the general getting started case remains nice and easy.

@jeffhostetler
Copy link
Contributor Author

Yeah, my original issue is that I need to hack on and/or single-step thru libgit2 as I'm working on a C# application.

And, yes there is way too much duplication of the various .sln and .csproj files doing it this way.

Let me take a look at the env var approach (now that I've figured out how the existing build scripts work).

@jeffhostetler
Copy link
Contributor Author

Abandoning this effort in favor of #1194.

@coveralls
Copy link

Coverage Status

Coverage decreased (-15.3%) to 72.459% when pulling 4d9bbb2 on jeffhostetler:jeffhostetler/wip_local_build into bd4e4c9 on libgit2:vNext.

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.

5 participants