镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Binaries in the repo #739

Description

@Therzok

This is a major issue. The repo size already reached 100mb. This is insane and not a good course of action.

Is there any solid reason why this is as such? I'd really recommend a binary purge.

Activity

  1. nulltoken commented on Jun 4, 2014

    @nulltoken
    Member

    I hear you.

    Is there any solid reason why this is as such? I'd really recommend a binary purge.

    Actually, when we started to work on the HistoryRewriter with @ben, one of the end goal was to dogfood LibGit2Sharp in order to rewrite the history and reduce the size of the repository. At this time, the idea was to extract the binaries and host them externally. Each rewritten commit would contain a powershell script which would download the correct libgit2 binaries.

    Is there any solid reason why this is as such?

    Yes, there is. Embedding the compiled binaries was a way to reduce the friction for contributors (at least on Windows).

    The repo size already reached 100mb.

    I'd be ok to shrink it down provided we find a way for contributors to not waste too much time updating to the correct version of libgit2 each time the submodule pointer has been bumped.

    Externally hosting the binaries may turn into a burden in the long time run. So, the only option I can think of right now would be to provide a script that would force the init of the libgit2 submodule, and build the binaries on demand (a trimmed and tweaked version of UpdateLibgit2ToSha.ps1). The drawback is that every contributor should have CMake installed on his/her computer to even run the tests.

    Another issue is the TeamCity CI server. In order to build libgit2, CMake would have to be installed on the agents (A counter-proposal could be to download the .zip version of CMake, extract it and use it to build libgit2).

    Thoughts?

    /cc @dahlbyk @kitbellew @ethomson @jamill @spraints @shiftkey @KindDragon

  2. shiftkey commented on Jun 4, 2014

    @shiftkey
    Contributor

    I don't believe 100MB is a huge repository size. Yes, binaries and Git do not play nice, but I think we're prematurely optimizing here.

    The benefit we get by embedding the binaries are that it's super-easy to start contributing. While there definitely feels like some redundancy in the task of updating the submodule and committing the binaries, the fact that a contributor doesn't need to compile libgit2 to get started is a huge win.

    And I'm fairly certain I've forgotten how to do that :trollface:

    I'm open to experimenting with incorporating CMake into the build script, but at this stage I'd favour fewer moving pieces in the build process over reducing the repository size.

  3. kitbellew commented on Jun 4, 2014

    @kitbellew
    • I usually don't put big files under version control but in this case it didn't look like a problem
    • why it was nice not having to build myself:
      • the first time I tried building libgit2, I ran into the cdecl vs stdcall issue (and it took me some time to figure out that it wasn't some other problem);
      • when I ran the PowerShell script yesterday, it kept trying to load old visual studio which wasn't installed anymore
    • if others prefer to store binaries outside, there are other ways:
      • naturally, nuget contains the released versions, although to release a new one is a chicken and egg problem
      • cursory search for github and binaries returns:

    https://github.com/proxy/help.github.com/articles/distributing-large-binaries

    http://blog.bintray.com/2013/05/30/google-and-github-insist-go-store-your-binaries-in-a-proper-place/

  4. dahlbyk commented on Jun 4, 2014

    @dahlbyk
    Member

    The benefit we get by embedding the binaries are that it's super-easy to start contributing.

    This.

  5. ethomson commented on Jun 4, 2014

    @ethomson
    Member

    So. Maybe this is a stupid question, but what about nuget?

    I made a native nuget package for libgit2 just now, which was quite straightforward. Note that native nuget packages only create a native target. It seems from https://nuget.codeplex.com/discussions/396720 like we might be able to extend this to apply to managed targets as well.

    Would this be a reasonable solution?

  6. nulltoken commented on Jun 4, 2014

    @nulltoken
    Member

    👍 A libgit2 NuGet package may indeed be a very suitable solution. @ajepst mentioned this solution as well.

  7. ajepst commented on Jun 4, 2014

    @ajepst

    Hi all, to summarize what I sent to @nulltoken, CodeBetterCI can support you if you choose to go the cMake route, but like a lot of you, I personally also think that nuget is the way to go - I think a required C compile is a big barrier to C# devs who may not even have C tools downloaded or have any familiarity with them.

  8. Therzok commented on Nov 18, 2014

    @Therzok
    MemberAuthor

    Oh, and while we're at it. Can we ship a nuget executable in .nuget and add our dependencies from Lib from NuGet? (1 executable vs X libs)

  9. nulltoken commented on Nov 18, 2014

    @nulltoken
    Member

    @Therzok Just to make sure. Currently, this would allow us to get rid of xUnit and Moq binaries, wouldn't it?

  10. Therzok commented on Nov 18, 2014

    @Therzok
    MemberAuthor

    Yeah, we could include them as nuget packages and add a nuget restore in the solution if we include a NuGet Binary.

    See: https://github.com/mono/monodevelop/blob/master/main/src/addins/NUnit/MonoDevelop.NUnit.csproj#L253-L259

  11. nulltoken commented on Nov 18, 2014

    @nulltoken
    Member

    Ok. Let's try this. Just a question though. Why the Exists('$(SolutionDir)\..\.git')" condition?

  12. Therzok commented on Nov 18, 2014

    @Therzok
    MemberAuthor

    Ah. It was a hackfix for MD to not do it from tarballs.

  13. added this to the v0.22 milestone on May 25, 2015
  14. nulltoken commented on Jun 11, 2015

    @nulltoken
    Member

    As we now rely on a NuGet package for binaries, do we still need to keep this opened?

  15. Therzok commented on Jun 11, 2015

    @Therzok
    MemberAuthor

    None at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions