ARK-Builders / ARK-Builders/ark-core

Move path constants to proper `fs` crates

Open
#11 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

We have multiple "path constants" defined in the `fs-storage` crate:
https://github.com/ARK-Builders/ark-rust/blob/main/fs-storage/src/lib.rs

However, none of them belong to this crate:
* `ARK_FOLDER = ".ark"`

* The most generic constant necessary for any `fs` crates, all apps which persist something on disk using `fs` crates will use this constant to locate the folder with internal app data. What about `fs-core`? Would we have other definitions in `fs-core`?

* `TAG_STORAGE_FILE = "user/tags"`, `SCORE_STORAGE_FILE = "user/scores"` and `PROPERTIES_STORAGE_FOLDER = "user/properties"`

* Denote specific storages for user-defined metadata (should not be lost if possible, and we cannot restore the data). These constants must be defined in `fs-tags`, `fs-scores` and `fs-properties`.
* `STATS_FOLDER = "stats"` and `FAVORITES_FILE = "favorites"`

* Denote specific storages enhancing user experience (should not be lost if possible, but we can restore the data). These constants must be defined in `fs-tags-stats` and `fs-favorites`.

* `METADATA_STORAGE_FOLDER = "cache/metadata"`, `PREVIEWS_STORAGE_FOLDER = "cache/previews"` and `THUMBNAILS_STORAGE_FOLDER = "cache/thumbnails"`
* Denote storages for generated data, or _caches_. We always can rebuild these storages from scratch. We need crates `fs-metadata`, `fs-previews` or `fs-thumbnails` to expose these constants.
* `INDEX_PATH = "index"`

* Denotes location for the index, similar to caches we can build it from scratch, it would only cost us some time. Must be defined in `fs-index`.

Contributor guide

Open the contributing guide

Research direction

Start in fs-storage/src/lib.rs and trace references to each listed path constant across the fs-* crates. Move each constant to the crate named in the issue, then verify that all references still resolve and the workspace builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.