Refactor common code into crate
Open
Nobody has claimed this yet.
Issue-Enhancement
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
There is some common code in many/all the current resources. This code should be refactored into functions and put into a create that can be reused instead of duplicated. For example, the code to check an environment variable and then prompt a user to attach a debugger.
Proposed technical implementation details (optional)
- Create a new library crate, e.g.,
dsc_utilsthat contains common code that can be reused in many/all resource implementations. - Move
file_lib/src/debug.rsinto the new crate and update all resources that use similar code to prompt the user to attach a debugger. - The code used to read the pipeline into a string is another good candidate for this.
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
Start by reading file_lib/src/debug.rs and locating the resource implementations with duplicated debugger-prompt or pipeline-reading code. Confirm the new crate boundary, then update the affected resources to reuse the common code. Done means the shared logic is centralized in a reusable crate rather than duplicated across resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100