Question

I don't understand the following excerpt. More precisely, it's not clear what the #includes: directive is since it looks exactly like the opposite of #requires:.

spec for: #'pharo3.x' do: [
    spec 
        package: 'Grease-Core' with: [
            spec includes: #('Grease-Pharo30-Core' ). ];
        package: 'Grease-Tests-Core' with: [
            spec includes: #('Grease-Tests-Pharo20-Core' ). ];
        package: 'Grease-Pharo30-Core' with: [
            spec requires: #('Grease-Core' ). ];
        package: 'Grease-Tests-Pharo20-Core' with: [
            spec requires: #('Grease-Tests-Core' ) ] ].
Was it helpful?

Solution

It is an opposite to the requires but it does more. If A requires: B and B includes: A, then loading B effects, that A is also loaded (because of #includes:) after B is loaded (because of #requires).

I had a discussion with Dale about this behavior. In the end, it is a naming issue. In the debian World, you would use something like #provides: (which is not existing), and you could write

A provides: B

However, the fact that still A requires: B would not be reflected there.

TL;DR

When A includes: B, then loading A also loads B.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top