Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Only the first shallow call of a sequence of calls is recorded on shallow mode

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby
領域
observability

調査の方向性

lib/appmap/hook/method.rb の98行目付近にある浅いパッケージのチェックから始め、minutes.ago と year.ago を使って Calc の例を再現します。AppMap.tracing が最後のパッケージをどのように追跡しているかを調べ、浅い呼び出しをすべて記録できるように、両方の ago 呼び出しを含めて、スタックベースのアプローチを検討します。

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

説明

bug

While implementing the shallow mode for appmap-node agent I noticed this and it's been checked by @dividedmind:

I just checked and for example
require 'active_support/core_ext'

class Calc
  def calc x
    y = x.minutes.ago
    z = 1.year.ago
    y.to_i - z.to_i
  end
end

indeed only records #minutes, ignoring #year and both invocations of #ago.

It seems that the problem is with this line return false if hook_package&.shallow? && AppMap.tracing.last_package_for_current_thread == hook_package that checks the last recorded package. Because no other package is recorded between the calls mentioned, the last package stays the same. This causes subsequent calls to be skipped from recording, even if they are also "shallow" calls. A stack based approach can be used to fix this.

主要言語
Ruby
スター
101
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

getappmap/appmap-ruby のほかの issue

getappmap/appmap-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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