On Sunday, 29 January 2023 at 17:14:40 UTC, Johann Lermer wrote:
right - but isn't one of make's features, that it compiles code only when the source changes? When you just compile the whole thing at once, I would expect that you get longer times than when you change just one source file and compile just that.

When your whole rebuild is fast enough, it doesn't really matter anymore.

Well, that's the theory. It seems, that in the meantime everything depends on everything and so even small changes in the code lead to a recompiling of quite a few files and now every time even a small change takes even longer to recompile than your approach.

Yeah, for an incremental rebuild to work well, you need to have pretty strict dependency discipline so chances actually can be isolated, and in D as well, you need to make sure your modules don't do much work just by being imported (just being referenced can trigger some compile time functions, for example, and if you compile things separately that depend on this, it gets done multiple times instead of just once like in the all-at-once build). This can be done, but it takes attention and often just isn't worth the hassle compared to the simple build, especially when the simple build does a decent job out of the box.

Maybe it's just better to remove the whole make stuff - but it seemed to be a good idea at the time...

I often make makefiles just cuz im used to typing `make`... but the contents are often:

all:
   dmd -i main.d

and i let the compiler do its thing.
  • Re: WildCAD -... Adam D Ruppe via Digitalmars-d-announce
    • Re: Wild... Johann Lermer via Digitalmars-d-announce
    • Re: Wild... Johann Lermer via Digitalmars-d-announce
      • Re: ... Adam D Ruppe via Digitalmars-d-announce
  • Re: WildCAD -... Ferhat Kurtulmuş via Digitalmars-d-announce
    • Re: Wild... Johann Lermer via Digitalmars-d-announce
      • Re: ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
        • ... Adam D Ruppe via Digitalmars-d-announce
          • ... Johann Lermer via Digitalmars-d-announce
            • ... Adam D Ruppe via Digitalmars-d-announce
          • ... bachmeier via Digitalmars-d-announce
            • ... Siarhei Siamashka via Digitalmars-d-announce
              • ... bachmeier via Digitalmars-d-announce
              • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
              • ... bachmeier via Digitalmars-d-announce
              • ... WebFreak001 via Digitalmars-d-announce
              • ... Hipreme via Digitalmars-d-announce
              • ... H. S. Teoh via Digitalmars-d-announce
              • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
              • ... H. S. Teoh via Digitalmars-d-announce

Reply via email to