plotly / plotly/plotly.R

Plotly generates many warnings because of trying to set `structure(NULL)`

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

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

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

説明

This line in plotly:
https://github.com/ropensci/plotly/blob/a76100d7c06774ec50c07982ff6bfdb6d2d09e2d/R/plotly_build.R#L281-L284

can result in setting structure(NULL), which throws many warnings.

I have an app with many plots, and one plot generates dozens of copies of this warning:

Warning in structure(if (i %in% npscales()) uniq(d[[i]]) else d[[i]], class = oldClass(x[[i]])) : Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead.

I don't have a minimal reprex because I haven't spent too much time finding out what kind of data can cause a NULL there, but it's definitely a NULL in d[[i]] that causes these warnings.

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

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

はじめの一歩

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

調査の方向性

R/plotly_build.R の281-284行目から始め、d[[i]] 内の NULL 値がどのように structure() に到達するかを追跡します。関連するデータ形状を含むプロットで警告を再現し、その後、既存のプロット構築動作を維持したまま、plotly が非推奨に関する警告を繰り返し出力しなくなったことを確認します。

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

評価

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

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

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