Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
Any thoughts on this?
[1] https://fedoraproject.org/wiki/Changes/RPM-4.12
On 04/01/2014 01:28 PM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
Any thoughts on this?
There is always issue that end users will hardly know why, should he install something and mostly there is no nice dialogue "This feature works only when you download also .....(and put it on classapth)" Not mentioning that upstreams do not care about "to enable this feature yum install someRpm"
Well I have (me-touching) example in mind. IcedTea-Web have "weak" dependence on tagsoup. Well it works without it, but then some JNLP files are not parsed. User get jsut "invalid xml" exception in this case. So he will have no clue, that he should install tagsoup,
Will there be any mechanism for this? I doubt:(
TBH - I can come only with one good usage - to use soft dependence *only* for dependence which are not in fedora. Once it is packed, lets it be installed all.
J.
On 04/01/2014 01:46 PM, Jiri Vanek wrote:
On 04/01/2014 01:28 PM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
Any thoughts on this?
There is always issue that end users will hardly know why, should he install something and mostly there is no nice dialogue "This feature works only when you download also .....(and put it on classapth)" Not mentioning that upstreams do not care about "to enable this feature yum install someRpm"
Well I have (me-touching) example in mind. IcedTea-Web have "weak" dependence on tagsoup. Well it works without it, but then some JNLP files are not parsed. User get jsut "invalid xml" exception in this case. So he will have no clue, that he should install tagsoup,
Will there be any mechanism for this? I doubt:(
TBH - I can come only with one good usage - to use soft dependence *only* for dependence which are not in fedora. Once it is packed, lets it be installed all.
I don't think what you described here is the behaviour of Recommends.
If package A recommends B then by installing A you also install B, unless something conflicts with it or obsoletes it. After installing A you can erase B without breaking dependencies.
Example. Lets assume we have package maven with: Requires: java-headless Recommends: java-devel Suggests: maven-doc
When you do "yum install maven", YUM should print something like:
Installing: maven Installing for dependencies: java-1.8.0-openjdk-headless Installing recommended dependencies: java-1.8.0-openjdk-devel You may also consider installing: maven-doc
Maven obviously cannot run without java-headless, so hard requirement is used here.
Maven is usually used to compile Java sources, hence Recommends on java-devel. But Maven itself works perfectly fine without java-devel, so users can erase java-devel after installing maven, if they want to. java-devel is a dependency that most users would expect, so it is "recommends".
maven-doc is just added as suggestion and it will not be pulled by yum with default settings. It's added there just to point users to other useful resources.
On 04/01/2014 02:14 PM, Mikolaj Izdebski wrote:
On 04/01/2014 01:46 PM, Jiri Vanek wrote:
On 04/01/2014 01:28 PM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
Any thoughts on this?
There is always issue that end users will hardly know why, should he install something and mostly there is no nice dialogue "This feature works only when you download also .....(and put it on classapth)" Not mentioning that upstreams do not care about "to enable this feature yum install someRpm"
Well I have (me-touching) example in mind. IcedTea-Web have "weak" dependence on tagsoup. Well it works without it, but then some JNLP files are not parsed. User get jsut "invalid xml" exception in this case. So he will have no clue, that he should install tagsoup,
Will there be any mechanism for this? I doubt:(
TBH - I can come only with one good usage - to use soft dependence *only* for dependence which are not in fedora. Once it is packed, lets it be installed all.
I don't think what you described here is the behaviour of Recommends.
If package A recommends B then by installing A you also install B, unless something conflicts with it or obsoletes it. After installing A you can erase B without breaking dependencies.
Example. Lets assume we have package maven with: Requires: java-headless Recommends: java-devel Suggests: maven-doc
When you do "yum install maven", YUM should print something like:
Installing: maven Installing for dependencies: java-1.8.0-openjdk-headless Installing recommended dependencies: java-1.8.0-openjdk-devel You may also consider installing: maven-doc
Maven obviously cannot run without java-headless, so hard requirement is used here.
Maven is usually used to compile Java sources, hence Recommends on java-devel. But Maven itself works perfectly fine without java-devel, so users can erase java-devel after installing maven, if they want to. java-devel is a dependency that most users would expect, so it is "recommends".
maven-doc is just added as suggestion and it will not be pulled by yum with default settings. It's added there just to point users to other useful resources.
Oh I see. Well then it gave much more sense o try to handle optional dependecs of maven this way.
J.
On 1 April 2014 12:28, Mikolaj Izdebski mizdebsk@redhat.com wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
Any thoughts on this?
[1] https://fedoraproject.org/wiki/Changes/RPM-4.12
-- Mikolaj Izdebski -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
It might be nice to also consider optional osgi dependencies. I believe we currently omit generating "Require"s on osgi bundles that are declared as optional. Generating some "Recommend"s instead might be ideal.
On 04/01/2014 07:28 AM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
+1 for optional->Recommends mapping
Any thoughts on this?
On 04/03/2014 06:48 AM, Peter MacKinnon wrote:
On 04/01/2014 07:28 AM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
+1 for optional->Recommends mapping
I would be cautious before deciding to universally and directly map Maven (build-time) dependencies to run-time dependencies. I think the general concept is a good idea though.
On 04/03/2014 05:30 PM, David M. Lloyd wrote:
On 04/03/2014 06:48 AM, Peter MacKinnon wrote:
On 04/01/2014 07:28 AM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
+1 for optional->Recommends mapping
I would be cautious before deciding to universally and directly map Maven (build-time) dependencies to run-time dependencies. I think the general concept is a good idea though.
They are already being mapped since Fedora 18, see [1].
Current mapping is:
Maven scope | generate Requires? ------------+------------------- compile | yes runtime | yes provided | no test | no system | fail the build
Currently even optional dependencies (marked in POM files as <optional>true</optional>) have Requires generated. I was thinking about generating Recommends for them instead of Requires. But that's a distant future it seems.
[1] http://fedoraproject.org/wiki/Features/Simplified_Maven_Packaging
On 04/03/2014 10:43 AM, Mikolaj Izdebski wrote:
On 04/03/2014 05:30 PM, David M. Lloyd wrote:
On 04/03/2014 06:48 AM, Peter MacKinnon wrote:
On 04/01/2014 07:28 AM, Mikolaj Izdebski wrote:
Fedora 21 will likely introduce so called "weak" or "soft" dependencies, also known as recommends and suggests. For proposed change see [1]. What do you think about Java packages adopting usage of weak dependencies?
An example: Dependencies declared as optional in POM files could be translated by dependency generators to Recommends instead of Requires.
+1 for optional->Recommends mapping
I would be cautious before deciding to universally and directly map Maven (build-time) dependencies to run-time dependencies. I think the general concept is a good idea though.
They are already being mapped since Fedora 18, see [1].
Current mapping is:
Maven scope | generate Requires? ------------+------------------- compile | yes runtime | yes provided | no test | no system | fail the build
Currently even optional dependencies (marked in POM files as <optional>true</optional>) have Requires generated. I was thinking about generating Recommends for them instead of Requires. But that's a distant future it seems.
[1] http://fedoraproject.org/wiki/Features/Simplified_Maven_Packaging
This system may fail with "provided" dependencies as it may mean that the dependency is expected to exist in the target environment, but that it should not be packaged or bundled with the artifact. But as long as there's some kind of manual override capability, then it's probably okay.
java-devel@lists.fedoraproject.org