• Re: Using 'Image with Alire

    From Simon Wright@21:1/5 to Seth Workman on Sun Aug 6 22:58:12 2023
    Seth Workman <saworkman1@gmail.com> writes:

    I have only started learning about Ada recently and have discovered
    the 'Image attribute that can be used on all types starting in ada
    2022.

    I am using Alire and added the following to include the `-gnat2022` switch. ```
    for Default_Switches ("Ada") use Learning_Config.Ada_Compiler_Switches & ("-gnat2022");
    ```

    The Alire documentation warns about switches ~"In general, this should
    be avoided to preserve consistency in the ecosystem"

    Not 100% sure what this means!

    Is this the correct way about adding this switch or is there a way to
    use a toolchain that already has it by default?

    This works fine, but in your alire.toml you could say

    [build-switches]
    "*".ada_version = "ada2022"

    or

    [build-switches]
    "*".ada_version = ["-gnat2022"]

    See "Release Information" (near the end) and "Build Profiles and
    Switches" in the documentation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Seth Workman@21:1/5 to All on Sun Aug 6 14:17:40 2023
    I have only started learning about Ada recently and have discovered the 'Image attribute that can be used on all types starting in ada 2022.

    I am using Alire and added the following to include the `-gnat2022` switch.
    ```
    for Default_Switches ("Ada") use Learning_Config.Ada_Compiler_Switches & ("-gnat2022");
    ```

    The Alire documentation warns about switches ~"In general, this should be avoided to preserve consistency in the ecosystem"

    Is this the correct way about adding this switch or is there a way to use a toolchain that already has it by default?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Seth Workman@21:1/5 to Simon Wright on Sun Aug 6 15:17:07 2023
    On Sunday, August 6, 2023 at 4:58:18 PM UTC-5, Simon Wright wrote:
    [build-switches]
    "*".ada_version = "ada2022"

    or

    [build-switches]
    "*".ada_version = ["-gnat2022"]

    See "Release Information" (near the end) and "Build Profiles and
    Switches" in the documentation.

    I see now, I think using "*".ada_version = "ada2022" is better for this case

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)