`Environment` constructors should check input and return `Result`
Open
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:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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