From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Using 'Image with Alire Date: Sun, 06 Aug 2023 22:58:12 +0100 Organization: A noiseless patient Spider Message-ID: References: <3bdf9138-c60d-48a4-b720-21c25e96f16cn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="e77937a9e5722b1ca218e0bfd8071443"; logging-data="2630487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YFR3qFXMlbxo6AKHf4B2L1Lzu4lfxpVk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cancel-Lock: sha1:Vqz1VqpW1OrLoyMbKISZOPUfxCQ= sha1:/cbggm1k7+Zs/DJ9gF3T7TTwgfE= Xref: news.eternal-september.org comp.lang.ada:65494 List-Id: Seth Workman 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.