S3 methods in local environment are not identified

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

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

評価

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

調査の方向性

エントリポイント globals::globalsOf() から開始し、locals=TRUE と recursive=TRUE を指定して再現可能な例を実行します。commit 7847dd5 で参照されている、もともと含まれていたテストと動作を比較し、その後、ローカル S3 メソッドのリグレッションテストを追加または復元します。例が f.numeric を識別し、テストがパスすれば完了です。

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

説明

bug

Describe the bug

Originally mentioned in https://github.com/HenrikBengtsson/globals/issues/2, identification of local S3 methods is mentioned to be fixed in https://github.com/HenrikBengtsson/globals/commit/7847dd58d8101f22dc226bbb4d3d5de7d623adde (2018).

https://github.com/HenrikBengtsson/globals/issues/47 seems to be for S3 methods in packages specifically.

Related: https://github.com/mschubert/clustermq/issues/256

Reproduce example

f = function(i) UseMethod('f')
f.numeric = function(i) sqrt(i)
globals::globalsOf({ f(1) }, locals=TRUE, recursive=TRUE) # addS3 is no longer documented
# list()

The originally included test also seems to fail now, although it is no longer available. I also no longer see any mention on S3 in the tests or any changes to S3 behavior in the NEWS.

Expected behavior

Shouldn't this identify f.numeric?

Session information

R version 4.3.2, globals_0.16.2

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

環境構築

はじめの一歩

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

futureverse/globals のほかの issue

futureverse/globals の issue をすべて見る

似ている issue

R の issue をもっと見る

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

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