Opinion Poll: Should we keep API related to addressables visible if the addressables package is missing? #110
Pinned
starikcetin
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Back when I was developing the addressables support, I had to make a decision about what the behavior regarding the visibility of the addressables API should be when the addressables package is missing. These were the options:
#if
directives, so that they are only visible if the addressables package is installed.I decided to go with the option 2 back then because it made sense to not conditionally add and remove API based on an external factor.
Recently I started think this was not the right decision. If I have gone with option 1 then calling addressables API when the addressables package is missing would cause compile errors. Option 2 instead causes them to throw at runtime. Therefore we are pushing what could be a compile time validation to runtime, which makes iteration loops longer.
Therefore I want to ask everyone's opinion: should we change to option 1 instead?
Beta Was this translation helpful? Give feedback.
All reactions