From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:9f0d:: with SMTP id i13-v6mr861878ioe.28.1530716205464; Wed, 04 Jul 2018 07:56:45 -0700 (PDT) X-Received: by 2002:aca:4787:: with SMTP id u129-v6mr475174oia.4.1530716205295; Wed, 04 Jul 2018 07:56:45 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1754797itj.0!news-out.google.com!z3-v6ni1897iti.0!nntp.google.com!u78-v6no1749367itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 4 Jul 2018 07:56:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.9.244.34; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 194.9.244.34 References: <856189aa-fa00-4960-929e-174f352310ad@googlegroups.com> <2718c8d4-5f35-4fd8-a1aa-1e60069a7a5d@googlegroups.com> <39fce60c-9f56-42fb-b679-fa08810b00ee@googlegroups.com> <3701bf07-89a5-4cb0-a704-5aebb589ca79@googlegroups.com> <2f5e4ce0-94e8-4b94-9da7-045ec90a9b22@googlegroups.com> <18554067-1382-4b43-a832-2d27aa5117d7@googlegroups.com> <8dc19505-b68a-403c-a164-f1de1864f3f1@googlegroups.com> <559657f8-bbf4-4a70-9449-f85bc98d6c6b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <590d4672-4aef-42a5-823c-57ccd291115a@googlegroups.com> Subject: Re: Teaching C/C++ from Ada perspective? From: Maciej Sobczak Injection-Date: Wed, 04 Jul 2018 14:56:45 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53592 Date: 2018-07-04T07:56:45-07:00 List-Id: > > Yet, the trivial update of P (like adding whitespace, which again has > > no semantic meaning whatsoever) forces the recompilation of Test (with > > GNAT). Actually, it forces the recompilation of everything. Why? >=20 > gprbuild: > -m Minimum Ada recompilation >=20 > Only rebuild if there's a semantic difference Great! Let's try it out. I have added a dummy declaration to P, like here: -- p.ads: package P is pragma Pure (P); type TI is new Integer; -- new dummy definition end P; and... the whole project was recompiled from scratch. No other part of the project relies on this new type and in particular, the= author of Test still could not care less about package P and whatever it c= ontains. Yet, the author of Test had to wait for the whole project to recompile, bec= ause something irrelevant was added to some irrelevant package that he migh= t not even know that exists in the project. I presume that the -m switch was supposed to handle a trivial (and perhaps = frequent) case of editing comments and whitespace. There is some added valu= e in this, but it is easy to replicate for C++ and sorry, but I don't call = it "semantic" if it cannot figure out even the most basic cases like the on= e above. My claim that Ada and C++ compilers have the same challenges when it comes = to handling the physical project structure holds. --=20 Maciej Sobczak * http://www.inspirel.com