scarpe-team / scarpe

Scarpe - shoes but running on webview
Other
162 stars 29 forks source link

Repeat Shoes styles should print a warning to console #506

Open noahgibbs opened 9 months ago

noahgibbs commented 9 months ago

In lacci/lib/shoes/drawable.rb, in class-method shoes_style, we register a shoes style for a drawable class.

Right now, it says that if the style is already there, return without doing anything ("return if linkable_properties_hash[name]").

Instead, if the style is already there we should print a warning to the console or the log. If the feature or validator doesn't match, it should raise an exception instead of printing a warning.

There are pretty certainly repeated shoes styles currently, places where the parent class adds a shoes style and then a child class adds the same one. I've gotten rid of several already. It would be good to find them and get rid of the rest.