System 7 questions

Couple of Questions for Garmin, related to System 7:

1) Have you considered skipping API 5 and 6, and go straight to 7, to make System and API level line up??? There is plenty of confusion with the whole API vs system  level as is.

2) Have you considered making a way to select the compile version in the manifest or something?? System 7 seems to bring some (needed/nice) changes to core stuff, so there is no backwards compatibility with old System 4/5/6, right??? If one just needs to quickly fix a bug in an old app, might not make sense to update the code. Would be nice if the level was selected in the project, rather than only in the SDK manager.

3) Is there a list of which devices will get System 7 support? Surely VENU 3 and VA5 is on the list right? 

  

  • hi,

    we are now in System 6, so the next one is 7

    see here the explanation about this (difference between system and API level):

    https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/welcome-to-connect-iq-system-4

    about your 2) hope there is a backward compatibility...

  • 2)

    The way I read

    "System 7 helps you do more with less in a number of different ways. Devices supporting API 5.0.0 have new updates to the system opcodes designed to reduce the code space for common operations. Developers should expect an improvement of 20%– 30% when compiling on new devices."

    says to me that this will only be available on devices with a CIQ 5.x.x VM as older devices with an earlier VM won't understand the new bytecodes.

    So it doesn't make sense to compile with the new opcodes for a System 6 or earlier device.  The savings will only be seen on System 7 devices

  • thanks, this is what I though about this part,

    I was more "worried" about this:

    Previously, resource identifiers in the Rez module were typed as Symbol, but in the System 7 SDK they are now typed as Toybox.Lang.ResourceId. This applies to all devices and not just API 5.0.0 devices.

    I am not good at this to understand what will be the difference? Do we have to adapt the code?

  • Type checking is purely a compile time thing and has zero impact at runtime

    "This applies to all devices and not just API 5.0.0 devices."

    There might be some changes required if you use type checking to make the type checker happy.  Time will tell, but you can probably check right now with the beta sdk

  • "here the explanation about this (difference between system and API level)"

    the system version was supposed to make it easier, but if we're honest it hasn't made so, it confuses people, it confuses developers and it even confuses people within Garmin.

    to make matters worse at times it's also a marketing thing where a device is made part of a certain system level but doesn't have features of the api level it's mapped to. 

    it was a nice attempt, but the sane move would be to can the system version and get back to be api version only.

     

    "Type checking is purely a compile time thing and has zero impact at runtime"

    I'm not so sure it has "zero impact":

    - if I'm not mistaken there are some optimizations that only get applied when using type checking. 

    - if I'm not mistaken for type checking "compiler2" is/can be used, where non type checking projects use compiler1. behavior can be different between compiler1 and compiler2 (which may or may not be a bug) 

  • You can use type checking and optimization separately.

    for example, in monkey.jungle


    project.typecheck = 0
    project.optimization = 2
    and the optimization does occur.
  • Is there a list of which devices will get System 7 support? Surely VENU 3 and VA5 is on the list right? 

    We'll be updating the announcement with the full list, but it should be all 4.2.x devices . The Venu 3 and Vivoactive 5 will be getting System 7.

    Have you considered making a way to select the compile version in the manifest or something?? System 7 seems to bring some (needed/nice) changes to core stuff, so there is no backwards compatibility with old System 4/5/6, right???

    The System 7 compiler is backwards compatible back to the original vivoactive. It will only generate the newer instructions based on the API level of the device. You can use the most up-to-date SDK to compile for any device. You can pass --disable-v2-opcodes to the compiler to not use the new opcodes, but I would only recommend doing so if you've discovered a bug due to the new opcodes or you want to see the size difference in your PRG.

    Previously, resource identifiers in the Rez module were typed as Symbol, but in the System 7 SDK they are now typed as Toybox.Lang.ResourceId. This applies to all devices and not just API 5.0.0 devices.

    Backwards compatibility for ResourceId is handled by the compiler. If your project uses type checking, you'll have to adjust some types because the API now uses ResourceId instead of Symbol. But you can use the ResourceId type when building for any device.

    there are some optimizations that only get applied when using type checking

    The optimizer runs independently of the type checker.

    for type checking "compiler2" is/can be used, where non type checking projects use compiler1.

    "compiler2" is used for all compilations. "compiler1" no longer exists.

  • Please point me where I can read for all changes in System 7?

  • With every SDK. there is a file in the SDK root named README.  You can see the changes for the SDK.  In VSC, command palette>Monkey C: View Documentation>README

  • Is backwards compatibility also supported for the new "Tuple" type?
    Meaning: can I use this for typing in my code and still compile for any device?

    I'm guessing it needs to work the same as ResourceId since it's used for "older" API functions as well.