Under Review

Sdk-9.3 is too aggressive about unsupported apis for older devices

E.g given this code:

if (Activity has :ProfileInfo) {
    var sport = Activity.getProfileInfo().sport as Number?;
    // ...       
}

I get an error compiling for fr235, even though the code is guarded so it won't run.

ERROR: fr235: bug.mc:2: Value '$.Toybox.Activity.getProfileInfo' is not supported for device 'fr235'.

This didn't happen with any earlier version of the compiler.

I could work around it by moving the code into a separate function and adding with_profile_info and without_profile_info exclude annotations, and labelling each device appropriately, but there's no automated way to do that, and my project supports almost every device; so that's a lot of manual typing (and future updates could change which devices do or do not support ProfileInfo).

More to the point "has" tests are the documented way of dealing with things like this.