nushell / nushell/reedline

The `sqlite` feature changes behavior of many tests but tests should be additive

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

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
817
Forks
247
Avg merge
4d 14h
Merged PRs (30d)
30

Description

The Cargo book states about features

A consequence of this is that features should be additive. That is, enabling a feature should not disable functionality, and it should usually be safe to enable any combination of features. A feature should not introduce a SemVer-incompatible change.

A lot of code branches on whether the "sqlite" or "sqlite-dynlib" features are enabled. This is not necessarily semver breaking, but most of that code that doesn't have a hard dependency the SqliteBackedHistory. Examples and even more importantly tests shouldn't alter behaviour like this (e.g. in history/cursor.rs).

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

Start by inspecting the feature-dependent behavior mentioned in history/cursor.rs and the repository's tests and examples, comparing runs with sqlite and sqlite-dynlib enabled or disabled. Done means enabling these features no longer changes unrelated behavior and the affected tests remain additive.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.