cfg_bind() binds a term argument's internal handle, so cfg_bind("x", parse_term("2")) binds x = 9
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 67/100
調査の方向性
Start at the R cfg_bind() wrapper described in the issue and trace its .Call() into the Rust binding implementation. Check how the wrapper handles rssn_term values and vectors of length greater than one; use the examples in the issue to verify the behavior. Done means invalid inputs are rejected or terms bind to their evaluated values, with tests covering the reported cases.
索引モデルが issue の本文から書いたものです。
説明
cfg_bind() accepts an rssn_term and silently binds the symbol to the term's internal integer handle instead of its value, so cfg_bind("x", parse_term("2")) binds x = 9 (the handle), not x = 2.
library(rssn)
s <- rssn_session()
t <- parse_term("2", s)
unclass(t) # 9 (the term handle)
cfg <- rssn_config() |> cfg_numeric(1e-12) |> cfg_bind("x", t)
compute(parse_term("x", s), cfg, s)$value # 9 -- should be 2
compute(parse_term("x + 1", s), cfg, s)$value # 10 -- should be 3
cfg_bind() is function(config, symbol, value) .Call(..., as.character(symbol), as.numeric(value)). An rssn_term is an integer with a class, so as.numeric() strips the class and returns the handle. A different term therefore binds a different number unrelated to its text:
t2 <- parse_term("100", s)
cfg2 <- rssn_config() |> cfg_numeric(1e-12) |> cfg_bind("x", t2)
compute(parse_term("x", s), cfg2, s)$value # 15 (handle of "100"), not 100
The help page says value is "The number a symbol is bound to", so either a non-numeric argument should be rejected (as it already is for a value_new() object, which fails with cannot coerce type 'environment') or a term should be evaluated first. A length-2 vector is likewise silently truncated (cfg_bind("x", c(1, 2)) binds x = 1), so the argument is not validated at all.
rssn 0.3.0, R 4.6.2 binding, Windows x86_64.
- 主要言語
- Rust
- スター
- 36
- フォーク
- 3
- 平均マージ
- 14時間 51分
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Apich-Organization/rssn のほかの issue
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothオープンarea/ode-pde good first issue help wanted kind/contract severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Apich-Organization/rssn#383 ·
メンテナーはふだん 1 日以内に返信
-
area/numerical good first issue help wanted kind/doc-mismatch severity/5-trivial
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Apich-Organization/rssn#373 ·
メンテナーはふだん 1 日以内に返信
-
area/numerical good first issue help wanted kind/doc-mismatch severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Apich-Organization/rssn#371 ·
メンテナーはふだん 1 日以内に返信
-
json_encode() re-emits a decoded empty JSON object as [], so {} and {"":1} are not round-trip stableオープンarea/api-bindings good first issue help wanted kind/contract severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Apich-Organization/rssn#361 ·
メンテナーはふだん 1 日以内に返信
-
area/statistics good first issue help wanted kind/wrong-result severity/4-minor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Apich-Organization/rssn#362 ·
メンテナーはふだん 1 日以内に返信
Apich-Organization/rssn の issue をすべて見る
似ている issue
-
triage: failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxc-project/tsrs#1277 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
autofixer: follow-up triage: bug triage: classified triage: correctness triage: has-reproducer
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tursodatabase/turso#13221 ·
メンテナーはふだん 1 日以内に返信
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648対応中かも @flyingrobots が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
flyingrobots/edict#457 ·