Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New crate structure: fetcher-core and (maybe) fetcher-builder #30

Open
nachog00 opened this issue Feb 5, 2025 · 0 comments
Open

New crate structure: fetcher-core and (maybe) fetcher-builder #30

nachog00 opened this issue Feb 5, 2025 · 0 comments

Comments

@nachog00
Copy link
Contributor

nachog00 commented Feb 5, 2025

After thorough discussion, we realized that the current structure is ill suited for a couple reasons:

  • Setting up tests for fetcher's build script isn't trivial. Less so have it be picked up by some coverage tool.
  • It isn't completely clear yet whether having all the fetched resources in fetcher's OUT_DIR is a viable idea:
    • It is vulnerable to cargo clean.
    • It is (possibly?) prone to unnecessary re fetches on new build hashes.

The initial proposed solution consists of separating the current fetcher crate into two new ones:

  • fetcher-core: It implements all the actual fetching logic and defines tests on it
  • fetcher-builder: It simply uses fetcher-core as a build-dep and implements a build script. It's intended use is as a dev-dep of consumers. This would make it not compile (nor fetch) on simple builds from its consumer.

Whether we want/need -builder or not isn't clear yet, as it was pointed out that -core would already implement most of the logic needed for a consumer to use it directly, as it has to take in a directory as input, where it will store the fetched resources.

We agreed then on start by building -core with emphasis on making it compatible with whatever approach afterwards:

with or without -builder.

@nachog00 nachog00 mentioned this issue Feb 5, 2025
6 tasks
@ala-mode ala-mode moved this from Backlog to In progress in Zingolabs-Infrastructure-Kanban Feb 13, 2025
@ala-mode ala-mode moved this from In progress to In review in Zingolabs-Infrastructure-Kanban Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

No branches or pull requests

1 participant