This repository was archived by the owner on May 18, 2026. It is now read-only.
Replies: 2 comments
-
|
To handle functions that just act as stubs because it isn't implemented or not applicable, we could refactor to return Err Option Enums, if an option returns error, display a message like suggested above. If it returns sum, unwrap the return or success. Just a quick thought on implementation. May come back and comment more as I read through the rest. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I left a comment on #157 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Right now Comtrya seems to have 6 functions that are generally implemented with each provider:
Not all providers need each function: Some use stubs as long as actual code has not been written, some keep placeholder functions as they are actually not applicable to every provider. As we're seeing an increase in providers available the question arises: Could this be solved in a better way? For example simply leaving out functions in the providers and having a catchall in mod.rs that fails with some text like "Error: Provider X does not implement function Y!".
This should probably be decided upon before discussing which new functions might make sense to be introduced. Because right now adding one new function would probably mean at least adding a stub to every provider. This makes implementing optional or even unique features much more work than it has to be.
Two actions that come to mind immediately would be:
One thing that feels strange with Comtrya is that the action names do not actually hint that they are idempotent! I would much prefer if that was visible by talking about states. What I mean would be e.g. this:
While it's probably early enough to make invasive changes, I'm not sure it would be justified in this case. But maybe we could introduce aliases (some already exist, right?).
Another issue that I thought about it the current behaviour of bootstrap: It's done automatically if required. With more cross-platform providers it may not be desirable to assume the default provider and just do the bootstrap. Maybe I wanted to use Linux Brew on Arch rather than bootstrapping Yay? Or Pkgin on macOS instead of Brew? Or Ravensw instead of BsdPkg on FreeBSD? I would kind of prefer package operations to fail on systems where the default packaging system is not available and would need to be bootstrapped explicitly first:
action: package.bootstrapMaybe "auto bootstrap" could be a config option in the future?And finally we could start collecting ideas for useful new package functions, both common and unique. For two examples of the latter (i.e. not available in other / most packaging systems):
I'd like to see some brainstorming on which actions could be useful to have and what providers they would apply to.
Beta Was this translation helpful? Give feedback.
All reactions