"important" flag for wrapFunction? #33
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
Jameson
joke
options window
question
Split!
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
sparkle-devs/sparkle-old-migration#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
My addon "better flat design" modifies the rendering of input slots.
If I were to make a "Split! block design" addon, the two addons would try to overrite each other. Obviously we'd want the Split! input slots, not the snap-like ones of better flat design.
I've thought of making an important/unimportant flag in wrapFunction, maybe like this?
Perhaps a numerical priority system might be better? For example, the block design addon would have a priority of 2, and the better flat design addon would have a priority of 1. Sparkle's stuff would have a priority of 0 to permit patching from its addons.
Yeah, I thought of that, although I was worried that there would be inconsistency between number priorities (e.g: split and flat design accidentally use priority 2)
Perhaps we could have a function called
api.conflictsWithAddon()or something like that, and it throws an error if an addon with a given ID already exists, so that such conflicts are less likely?We could also make a database of wrapped functions, the associated addons, and the priority levels, so that developers know what precautions to take beforehand.
Isn't that a bit too much?
I think that might work, for debugging
True, but do you have a better solution to this problem? Your important flag is essentially the same thing but with higher chances of a conflict.
Yeah, I was always worried about that. I don't know how else to do this :-(
Let's try out a numerical priority system with no database. At our scale, it's unlikely to cause any major issues, and if it does, we'll figure out something better.
What if the user could choose? By default newer mods could have priority but the user could change the priority by doing something like dragging the mods in a list?
I like the idea of dragging the addons, but could we make it to where the newer addons are lower priority, and preloaded addons get the highest priorities by default, above user-installed addons?
Sounds good!
Closed with #35