>
> I don't get how this is a cycle.  It only means Bazel is too limited to
> distinguish between a header dependency and a C++ module?


Agreed, this isn't a true cycle, but bazel is opinionated about this (i.e.
forces workarounds).   In the example I highlighted it might have been
cleaner to take the approach  combining the two ".cc" files and ".h" files
into a single bazel target.  Within Google, there is a fairly strong
convention of 1 ".h" and ".cc" per build target.


> Do you mean that long compile times are ok because we can ask
> contributors to buy 16-core monsters?


No, this was my poor attempt at humor.  I apologize if it offended you or
anyone else.  The hardware I use for my Arrow development is old enough
that I've just started accepting slow build times.

Getting back to potentially merging this, we discussed on bazel on the sync
call.  One option is to not add this to the Arrow CI builds and let Google
projects that depend on the binding be responsible for keeping it working.
This has the potential for bit-rot, but might be a good compromise and let
other developers try it out to see if they like it.

Cheers,
Micah

On Wed, Nov 27, 2019 at 6:52 AM Antoine Pitrou <anto...@python.org> wrote:

>
> Le 27/11/2019 à 06:16, Micah Kornfield a écrit :
> >
> >>  Can you give an example of circular dependency?  Can this be solved by
> >> having more "type_fwd.h" headers for forward declarations of opaque
> types?
> >
> > I think the type_fwd.h might contribute to the problem. The solution
> would
> > be more granular header/compilation units when possible (or combining
> > targets appropriately).  An example of the problem is expression.h/.cc
> and
> > operation.h/.cc in the compute library.  Because operation.cc depends on
> > expression.h and expression.cc relies on expression.h there is cycle
> > between the two targets.
>
> I don't get how this is a cycle.  It only means Bazel is too limited to
> distinguish between a header dependency and a C++ module?
>
> For me, a cycle would be something like "expression.h includes
> operation.h which includes expression.h" (I've actually already seen
> things like this, though not in Arrow AFAIR).
>
> > I thought computer
> > upgrades where something to look forward to ;)
>
> Do you mean that long compile times are ok because we can ask
> contributors to buy 16-core monsters?
>
> Regards
>
> Antoine.
>

Reply via email to