posit-dev / posit-dev/ark

`Environment` constructors should check input and return `Result`

Open
#986 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

infra: reliability
Dominant language
Rust
Stars
337
Forks
32
Avg merge
8d 17h
Merged PRs (30d)
11

Description

Environment methods are doing dangerous things with inner (e.g. defineVar()) which hasn't been sufficiently type-checked.

E.g. here we are not checking that input is an environment:

https://github.com/posit-dev/ark/blob/aba06d0a802815029cd24e52208bb91d808c6b36/crates/harp/src/environment.rs#L55

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read crates/harp/src/environment.rs around line 55 and inspect the Environment constructors and defineVar(). Trace how inner is accepted and used, then identify the existing validation and error-handling conventions. Done means invalid inputs are type-checked and the affected constructors return Result as described by the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.