p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Each back end should list its dependencies separately. The top-level dependencies should only list the dependencies necessary for p4test.

Open fruffy opened this issue 11 months ago • 6 comments

Do not force users to install more than necessary if they only want to use one particular part of the compiler.

fruffy avatar Mar 15 '24 14:03 fruffy

Why is the p4test assumed to be always present? Or is it just that p4test does not have any dependencies that are also not dependencies of the "core" used by all backends?

vlstill avatar Mar 15 '24 14:03 vlstill

Why is the p4test assumed to be always present? Or is it just that p4test does not have any dependencies that are also not dependencies of the "core" used by all backends?

Yes, p4test does not have any non-core dependencies (except the control-plane maybe). We could make it optional too but then we only have gtest.

fruffy avatar Mar 15 '24 14:03 fruffy

We could make it optional too but then we only have gtest.

There is already a ENABLE_P4TEST option. So presumably it can be disabled already.

Of course, building without p4test makes the test suite much less useful, but I could see a downstream backend disabling it just to make the builds a bit faster.

vlstill avatar Mar 15 '24 14:03 vlstill

Yes, p4test does not have any non-core dependencies (except the control-plane maybe). We could make it optional too but then we only have gtest.

I would probably vote to have control-plane dependency optional, if possible. As control-plane currently requires protobuf and it's ok for a downstream project to have completely separate controlplane

asl avatar Mar 15 '24 19:03 asl

From the conversation it seems we are heading to disable the control plane dependencies which we install for p4test which is a non-core dependency. And also if we could disable other dependencies which are backend specific am I correct?

Sanket-0510 avatar Mar 16 '24 10:03 Sanket-0510

The relevant issue for this problem is https://github.com/p4lang/p4c/issues/4420. This requires adding checks for every back end and code that depends on the control plane.

fruffy avatar Mar 16 '24 17:03 fruffy