git source: bst show --format %{source-info} crashes with BUG 'NoneType' object has no attribute 'rsplit' on untracked source

オープン 初心者向け
#110 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

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

調査の方向性

Start in buildstream_plugins/sources/git.py at _guess_version around line 1084, then reproduce the issue with the provided untracked git source and bst show target.bst --format '%{source-info}'. Ensure source-info renders when the source has no ref, with version=None or omitted, and that bst show no longer crashes.

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

説明

Environment

  • BuildStream 2.7.0
  • buildstream-plugins 2.5.0 (git source)
  • Python 3.11

Steps to reproduce
Create a project with an element having a git source WITHOUT a ref(never tracked):

name: project
min-version: 2.6
element-path: elements
ref-storage: project.refs
aliases:
  my: <repo_name>
plugins:
- origin: pip
  package-name: buildstream-plugins
  sources:
  - git
kind: import
sources:
  - kind: git
    url: my:one/.git
    track: master

Run:
bst show target.bst --format '%{source-info}'

Actual result

BUG 'NoneType' object has no attribute 'rsplit'
  buildstream_plugins/sources/git.py, line 1084, in _guess_version
  main_split = string.rsplit("-g", 1)

Expected result
source-info should render (version=None or omit) without crashing —
bst show must not fail because one source is not yet tracked.

主要言語
Python
スター
8
フォーク
16
平均マージ
36分
マージ済み PR(30日)
2

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

apache/buildstream-plugins のほかの issue

apache/buildstream-plugins の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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