Skip to content

Expand on hard and soft requirements#105

Merged
hboutemy merged 7 commits into
apache:masterfrom
elharo:patch-34
Nov 8, 2019
Merged

Expand on hard and soft requirements#105
hboutemy merged 7 commits into
apache:masterfrom
elharo:patch-34

Conversation

@elharo
Copy link
Copy Markdown
Contributor

@elharo elharo commented Nov 1, 2019

Copy link
Copy Markdown
Contributor Author

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

Comment thread content/apt/pom.apt Outdated
Version requirements have the following syntax:

* <<<[1.0]>>>: "Hard" requirement on 1.0
* <<<1.0>>>: "Soft" requirement on 1.0. Use 1.0 if no other version appears earlier in the dependency tree.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel "earlier" is not a good word to describe items in a tree data structure. I would delegate the case of duplicates to Dependency mediation in Maven doc

Comment thread content/apt/pom.apt Outdated
* <<<1.0>>>: "Soft" requirement on 1.0. Use 1.0 if no other version appears earlier in the dependency tree.

* <<<(,1.0]>>>: x \<= 1.0
* <<<[1.0]>>>: "Hard" requirement for 1.0. Use 1.0 and only 1.0, even if other versions come before this dependency in
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need "even if" clause. The word "before" assumes items in one sequence, but dependency is a tree, which would take additional explanation of level ordering.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment thread content/apt/pom.apt Outdated

* <<<(,1.0]>>>: x \<= 1.0
* <<<[1.0]>>>: "Hard" requirement for 1.0. Use 1.0 and only 1.0, even if other versions come before this dependency in
the tree. If multiple hard versions conflict, fail the build.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the tree. If multiple hard versions conflict, fail the build.
the tree.

This is repeating line 415 If there are no versions of a dependency.... Not specific for the syntax [1.0].

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rewrote

Comment thread content/apt/pom.apt Outdated

* <<<(,1.1),(1.1,)>>>: this excludes 1.1 (for example if it is known not to work in combination with this library)
* <<<(,1.0],[1.2,)>>>: Hard requirement for any version less than or equal to 1.0 than or greater than
or equal to 1.2, but not 1.1. Multiple requirements are comma-separated
Copy link
Copy Markdown

@suztomo suztomo Nov 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
or equal to 1.2, but not 1.1. Multiple requirements are comma-separated
or equal to 1.2, but not 1.1. Multiple hard requirements are comma-separated.

I tried to combine a hard requirement and a soft requirement. It did not work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread content/apt/pom.apt Outdated
or equal to 1.2, but not 1.1. Multiple requirements are comma-separated

* <<<(,1.1),(1.1,)>>>: Hard requirement for any version except 1.1; for example because
it is known not to have a critical vulnerability.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it is known not to have a critical vulnerability.
the version is known to have a critical vulnerability.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread content/apt/pom.apt
* <<<[1.0,2.0)>>>: 1.0 \<= x \< 2.0; Hard requirement for any version between 1.0 inclusive and 2.0 exclusive.

* <<<(,1.0],[1.2,)>>>: x \<= 1.0 or x \>= 1.2; multiple sets are comma-separated
* <<<[1.5,)>>>: Hard requirement for any version greater than or equal to 1.5.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* <<<[1.5,)>>>: Hard requirement for any version greater than or equal to 1.5.
* <<<[1.5,)>>>: Hard requirement for any version \>= 1.5.

Consistency with line 424 Hard requirement for any version \<= 1.0

@hboutemy hboutemy merged commit 953d4fa into apache:master Nov 8, 2019
@hboutemy
Copy link
Copy Markdown
Member

hboutemy commented Nov 8, 2019

thank you @elharo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants