libgit2 / libgit2/libgit2sharp

Running from Native AOT app fails to build signature

オープン
#2,187 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

説明

This is a clean repro:

#:package LibGit2Sharp@0.*
#:package Spectre.Console@0.*
using System;
using LibGit2Sharp;
using Spectre.Console;

using var repo = new Repository(Environment.CurrentDirectory);
var signature = repo.Config.BuildSignature(DateTimeOffset.Now);

if (signature == null)
{
    AnsiConsole.MarkupLine("[red] Unexpected error: Git user.name and/or user.email are not configured.[/]");
    return 1;
}
else
{
    AnsiConsole.MarkupLine($"[lime]{signature}[/]");
    return 0;
}

When running this script from a git repo dir with dotnet run --file repro.cs, you get the proper signature built from the found config.

Doing dotnet publish repro.cs and then running it from artifacts\repro\repro.exe will result in the error path consistently.

The PR #2188 fixes it and can be verified by changing the above repro script to use my CI feed:

#:package LibGit2Sharp@0.31.1
#:package Spectre.Console@0.*
#:property RestoreSources=https://api.nuget.org/v3/index.json;https://pkg.kzu.app/index.json

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された repro.cs スクリプトから始め、dotnet run --file repro.csdotnet publish repro.cs の後に artifacts\repro\repro.exe を実行した場合を比較します。PR #2188 を確認し、公開された Native AOT アプリがエラーパスを取るのではなく、構成から期待される Git 署名を構築することを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, git
領域
build-system
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。