This repository was archived by the owner on May 18, 2026. It is now read-only.
feat: Package Provider Optionals#157
Closed
martintc wants to merge 3 commits into
Closed
Conversation
Member
|
@martintc I think this might be easier to implement if you take a look at pub trait PackageProvider {
fn name(&self) -> &str;
fn available(&self) -> bool;
fn bootstrap(&self) -> Vec<Step>;
fn has_repository(&self, package: &PackageVariant) -> bool;
fn add_repository(&self, package: &PackageVariant) -> Vec<Step>;
fn query(&self, package: &PackageVariant) -> Vec<String>;
fn install(&self, package: &PackageVariant) -> Vec<Step>;
}You'll see this trait. Below it, you could implement generic functions that log a "Does not implement" inside a Let me know if that doesn't make sense and I'll provide an example. |
Member
Author
|
@rawkode An example would be appreciated! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Still very much in draft. The idea is to refactor such that features of packages action return values wrapped in
Option<>.Feature not implemented in package providers or incomplete can returnNonewhere comtrya will gracefully exit the action with a message that the feature is incomplete, not implemented or does not apply to the package manager.