free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.82k stars 103 forks source link

Remove unnecessary includes from clap.h #388

Closed Trinitou closed 3 weeks ago

Trinitou commented 10 months ago

let's see if this passes the pull-request workflows... 😉

I think this removes some clutter. here is my theory:

abique commented 10 months ago

I'm not sure about that one.

The goal of clap.h is to pull everything except the draft. If x.h is included by y.h and we decide to not add x.h to clap.h, you still get x.h indirectly by including clap.h. But, if one day x.h isn't included anymore from y.h, then we need to remember to add back x.h to clap.h.

If we directly include all headers in clap.h, we don't rely upon indirect inclusion.

We use #pragma once so I believe that it is a piece of cake for the compiler and the overhead is negligible.

Having everything in clap.h facilitate navigation within an IDE maybe :thinking: .

baconpaul commented 10 months ago

If clap.h is meant to be universal header I agree it should include things directly even if they are also included transitively

Trinitou commented 10 months ago

Should we close this (incomplete) pull-request as we want a more universal solution for all includes? Or should we leave it here and bring it into a 1.2.1 discussion later? + Maybe change it into a draft?

baconpaul commented 10 months ago

Let’s change it to draft so we don’t forget

abique commented 3 weeks ago

So what do we decide here? I was not in favor of this change, but I don't mind either.

What's the last call? We close it?

Trinitou commented 3 weeks ago

So what do we decide here? I was not in favor of this change, but I don't mind either.

What's the last call? We close it?

I'm fine with closing