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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,206547e68a60b0e7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: How to cache output of the compiler aka ccache Date: Mon, 21 Mar 2005 08:16:53 +0000 Message-ID: <2836529.BOqhxBo8yv@jellix.jlfencey.com> References: <1111085641.211767.56950@f14g2000cwb.googlegroups.com> <7f8cfe1b.0503172258.2ef3b9f6@posting.google.com> <21369831.btob92lcNg@jellix.jlfencey.com> <8764zpggo8.fsf@deneb.enyo.de> <2025459.1b53Xg3BXS@jellix.jlfencey.com> <87zmx0exbm.fsf@deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net KAodB0WsamLyihVjHHqrnAScmZiOGbTPyQSpt57xDmu9yT/2oK X-Phone: +41 62 961 13 52 X-Mood: Beautiful day to take over the world. Xref: g2news1.google.com comp.lang.ada:9661 Date: 2005-03-21T08:16:53+00:00 List-Id: Florian Weimer wrote: > * Vinzent Hoefler: > >> Florian Weimer wrote: >> >>> * Vinzent Hoefler: >>> >>>> It obviously fails to recompile missing dependencies. From my tests >>>> it also seems to ignore file dates. So I'd say, the "Java Build >>>> System" is non-existent. >>> >>> It's not specified by the standard. >> >> That's as good as "non-existent". :) > > Uh-oh, even with Ada, this is mostly a quality-of-implementation > issue. Ada implementations only need to enforce consistency. Yep. And talking about the compilation system: In which way is this different from taking all dependencies into account and check if they need to be recompiled? > There's > no need to support build tools which recognize dependencies and > automatically recompile them. It's also perfectly acceptable to > always recompile all dependencies. Ok, yes, that's the painful way. But at least it *would* recompile them then. >>> Sun's implementation optionally >>> recompiles out-of-date dependencies, though. >> >> Well, yes. I've tested some more, and from those tests it seems, >> Sun's "javac" recompiles dependencies if they are at most one level >> deep (or - to put it another way - direct dependencies of the file >> being compiled). It even does that recursively, so if I delete /all/ >> .class files it recompiles everything, of course. > > Oh, come on, have a closer look at the documentation. What documentation? hovi@jellix:~> man javac No manual entry for javac hovi@jellix:~> javac -help Usage: javac where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirs Override location of installed extensions -d Specify where to place generated class files -encoding Specify character encoding used by source files -source Provide source compatibility with specified release -target Generate class files for specific VM version -help Print a synopsis of standard options Oh, obviously you mean . Well, yes. The part about "searching for types" seems to imply it recompiles needed things. But in fact it doesn't (yes, I *did* use the -verbose option to check for that). The fact is: if it compiles class A which depends on class B which depends on class C and class C is out of date, but class B is not yet, it does *not* recompile it. It stops after checking class B. And from what I understand, this behaviour is indeed conforming to the specification (if you'd like to call the information on some company's web site a "specification"). Vinzent. -- worst case: The wrong assumption there actually is one.