Replies: 1 comment
-
This can also be done in user-land e.g. something like https://github.com/Ry-ot/Ryot/blob/ac526bab19318f859c9c4238321576f3d9eeb505/crates/ryot_utils/src/app.rs#L42-L54 |
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
-
We have
try_insert
for entities. Doc:Could we have
try_add_plugins
for apps? Doc:Instead of this:
Which gates against panics like this:
The new function would let us do this:
Motivation: I have 10s of lines of code of plugins being added only if they aren't already added and it would save lines but also possible bugs (when you copy paste and forget to change both instances of the plugin name).
I know there are lots of floating ideas around plugin dependencies / requirements, etc. but I wonder if this is a small enough API additional that it doesn't hurt in the long run even if/when a new API arrives.
Beta Was this translation helpful? Give feedback.
All reactions