Jens Mühlenhoff
Jens Mühlenhoff

Reputation: 14873

Do I have to specify the indirect dependencies in the requires section of a package?

Let's say I have these projects:

What is the correct requires section for each of those?

Package2 clearly depends on Package1.

Package3 depends on both Package1 and Package2? Or is it ok to just specify Package2 if I know that Package2 will depend on Package1?

What about Package4 does it have to specify Package1 in addition to Package2?

What are the rules for what goes into the requires section of a package?

PS: Let's assume I want to be able use static linking as well as dynamic linking.

BTW: I tried running the bpls through Dependencies, but then the actual imports and exports that Delphi generates under the hood are not in a 1:1 relation to the requisites anyway.

Upvotes: 0

Views: 129

Answers (1)

Uwe Raabe
Uwe Raabe

Reputation: 47714

Any package required by a required package is seen as indirectly required and need no own reference in the requires section.

Given your example above the requires for each package should at least contain

Package1: 
Package2: Package1
Package3: Package2 (makes Package1 indirectly required)
Package4: Package2 (makes Package1 indirectly required)

Of course each package should list all required standard (RTL, VCL,...) packages. The above rule can be applied for those, too. F.i. requiring vcl implicitly requires rtl.

Upvotes: 2

Related Questions