Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-releng-dev] Stop listing transitive dependencies in features?

> The problem is that when we update the .target file, then some features
> needs to be "touched" to include latest version; otherwise they either
> make further builds fail, or let them succeed still using older version.

I don't think the feature is to blame here but the baseline replace and Tycho to not detect this change. It might probably be good to create a reproducer and fix this independent from this concrete issue.

> We're talking about transitive deps on bundles
> not on included feature

okay then I misunderstood your request here.

> Indeed Import-Package is better; but from p2 perspective, it's just
> another way to describe a dependency not too differently from
> Require-Bundle.

The huge difference is that you require a very specific artifact instead of a generic capability. So if we require *this* version of a bundle that is present at the given build that should be expressed in the feature as it is part of the "a set of plugins that all together
provide an interesting and consistent functions to user".
And as one could describe version ranges on bundles as well I see this is almost never used correctly and P2 does a bad job in deciding the right things then (not P2 fault of cause).

So if you want so solve the the problem "upgrading dependencies is hard" then converting to import-package with a proper range will solve this and as a feature can't express dependencies to packages will lead automatically to get rid of the transitive dependency ;-)


Am 09.04.22 um 14:02 schrieb Mickael Istria:


On Sat, Apr 9, 2022 at 1:52 PM Christoph Läubrich <laeubi@xxxxxxxxxxxxxx <mailto:laeubi@xxxxxxxxxxxxxx>> wrote:

    Maybe it would be better to describe what the problem is (and probably
    get a better solution than removing those).


The problem is that when we update the .target file, then some features needs to be "touched" to include latest version; otherwise they either make further builds fail, or let them succeed still using older version.

    In general, for me features *not* listing their dependencies is a bit
    useless I think as one then not can see what other features are pulled
    in when installing it (you just get the minimal required bundles and
    this might break).


We're talking about transitive deps on bundles, not on included feature, and actually, there are already many features that don't list all transitive dependencies. A feature is a functional group: a set of plugins that all together provide an interesting and consistent functions to users. What transitive dependencies they use is not part of the functional group; and this is the duty of a dependency manager to resolve and install dependencies, not to replace the duty of a developer to duplicate definition of dependencies in many places.

    If X requires saf4j bundle it should list a proper *bundle* requirement
    in the feature (most probably with compatible match rule) and not a
    feature I think.


That's already defined in Require-Bundle or Import-Package. Why duplicating this information?

    requiring plugins is bad anyways, why we do not use import packages
    with
    proper version range (consumer in this case?) and then it would be fine
    to remove it from any feature then.


Indeed Import-Package is better; but from p2 perspective, it's just another way to describe a dependency not too differently from Require-Bundle. So if it's fine to remove things transtively required by Import-Package, why not removing those transitively required by other directives (that are as well covered by p2)?

_______________________________________________
platform-releng-dev mailing list
platform-releng-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-releng-dev


Back to the top