Acknowledged

Compile device version check (which produces "ERROR: Device X requires API Level Y") not applied to Export Project, only Build Current Project and Build for Device

This has added fuel to the fire of the ongoing, years-long debate about whether you can or should use an older SDK to build for a device with a newer CIQ API level that the SDK doesn't support.

Details:

- edge1050/compiler.json currently has connectIqVersion == "5.1.0"

- SDK 7.4.3 does not support CIQ 5.1.0

- SDK 8.1.0 does support CIQ 5.1.0

Recreation procedure:

- Use SDK 7.4.3

- Create Monkey C project with edge1050 as the sole device

- Build with "Monkey C: Build Current Project" or "Monkey C: Build for Device". The compiler will return the following error message:

> ERROR: Device 'edge1050' requires API Level '5.1.0'. The current SDK supports up to API Level '5.0.0'. Try updating your SDK using the Connect IQ SDK Manager.

- Select "Monkey C: Export Project" from the command palette. The compiler will build the project without complaint (no warnings or errors related to lack of compiler support for CIQ 5.1.0)

- According to a forum comment, such an exported project can also be successfully uploaded to the store (unsurprisingly)

  • > This has added fuel to the fire of the ongoing, years-long debate about whether you can or should use an older SDK to build for a device with a newer CIQ API level that the SDK doesn't support.

    Speaking of the dIsCoUrSe, it's very obvious that there are two diametrically opposed sides here:

    - developers who vocally wish to use older SDKs to build for newer devices, and insist there's no problem doing so

    - Connect IQ team members who are adamant that this should not be possible, and even if you can somehow get it work, it's not a good idea

    It doesn't help that there have been two major bugs with the version check system that we know of:

    - For SDKs < 7.2, the compiler would assume that it supports all CIQ versions greater or equal to its own version number. Therefore, SDK 6.4.2 incorrectly builds for CIQ 5.* devices, and SDK 7.1 incorrectly builds for CIQ 5.0.1 and 5.1 devices. This bug was fixed in SDK 7.2

    - This bug, where the check isn't even applied for Export Project.

    This is why I opened the other bug report, asking if there's actually any scenario where building with an older SDK could cause a crash on a newer device (ofc assuming the app does not try to use any new features). If the answer is yes, this would seem to fly in the face of the well-known fact that old apps (built with old SDK) continue to work on a device after its firmware/CIQ have been updated. If the answer is no, this would contradict the statement that you're not supposed to use old SDKs to build for devices with a newer CIQ version, and it would obviate the need for the version check.

    The additional wrinkle is that some devices (e.g Fenix 8) launched with a newer CIQ version (5.0.1), while other devices (e.g. FR955, Fenix 7) launched with CIQ 4.x but have now been updated to CIQ 5.x.

    Are the rules different for the devices which launched with newer CIQ versions as opposed to the devices which were updated to newer CIQ versions?