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)

  • Another example:

    You can see that no amount of explanation or screenshots will convince some devs that you aren’t *supposed* to build for newer CIQ versions with older SDKs. (Never mind what is possible or practical.)

    Obviously it doesn’t matter what I say, only official documentation or an announcement from Garmin is going to be enough to convince some people.

  • And I'm happy with this bug because it's possible to make IQ file without checking this:-)

    In my opinion, there is no any reason to check the minimum version. 

    For me, the trouble is treating the compilers options as error instead of warning. The only problem is the reusing them (e.g -c options) but reusing isn't a good idea, especially you can use 2 letters...

  • Maybe the store should also check this and give a clear error message if a too old version of SDK was used and the IQ file includes devices that should not be built with that SDK.

    Also it would be nice if the store would be able to know which version of device files (I guess compiler.json) was used for the export and if it's not the latest then give a WARNING (wouldn't want an error)

  • Of course, even if this bug is fixed, it will almost certainly only be fixed in a *newer* SDK, which means that older SDKs will still have the problem.

    Same issue as the bug that was fixed in SDK 7.2.0. All SDKs older than 7.2.0 will still incorrectly build for devices with CIQ level greater or equal to the SDK's version.

    It's too bad there isn't some official announcement or section in the documentation which explains all of this stuff from the POV of the Connect IQ team. i.e. "Don't build for devices with new CIQ version using older SDKs, and here's why."