Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No documentation page for -versionpolicy instruction #6372

Closed
bric3 opened this issue Nov 16, 2024 · 5 comments · Fixed by #6373
Closed

No documentation page for -versionpolicy instruction #6372

bric3 opened this issue Nov 16, 2024 · 5 comments · Fixed by #6373

Comments

@bric3
Copy link

bric3 commented Nov 16, 2024

I was reading this page (https://bnd.bndtools.org/heads/import_package.html) and tried to navigate to the version policy instruction page (https://bnd.bndtools.org/instructions/versionpolicy.html), but this lands on a 404.

I suppose the doc is simple, however having a description of the default format would be nice.

I have this in mockito -versionpolicy: [${version;==;${@}},${version;+;${@}}), and I think it means something about a range from the current version to the next.

@chrisrueger
Copy link
Contributor

chrisrueger commented Nov 17, 2024

@bric3 there is https://bnd.bndtools.org/instructions/consumer_policy.html and https://bnd.bndtools.org/instructions/provider_policy.html (Update: and https://bnd.bndtools.org/chapters/170-versioning.html and https://bnd.bndtools.org/macros/range.html)

I cannot find a versionpolicy.md in the source anymore, so maybe it is outdated.

Do these links answer your questions? If yes, I could update the docs to link to those links instead of the 404 one.

chrisrueger added a commit to chrisrueger/bnd that referenced this issue Nov 17, 2024
fixes bndtools#6372
Signed-off-by: Christoph Rueger <[email protected]>
@bric3
Copy link
Author

bric3 commented Nov 18, 2024

@chrisrueger I saw these links, that say I don't really now how much they apply there.

I'm not well versed in OSGI (so I'm not sure at all of what I write there), they all look fitting in a way, like section 10.5 in https://bnd.bndtools.org/chapters/170-versioning.html but I feel this option is about configuring a default for the import package directive as the doc page indicates:

The import package doc That is, when the exporter is 1.2.3.build123, then the import version will be 1.2. If a specific version (range) is specified, this will override any found version. This default an be overridden with the -versionpolicy instruction.

Also I'm not sure how to read the range [${version;==;${@}},${version;+;${@}}) from range documentation page because the syntax is completely different.

@chrisrueger
Copy link
Contributor

chrisrueger commented Nov 18, 2024

I believe this is also an important link for the version / versionmask macro:
https://bnd.bndtools.org/macros/version.html

Regarding: [${version;==;${@}},${version;+;${@}}) I believe it reads:

Lower Bound ([): Inclusive, starting at the exact version (${version;==;${@}}).
Upper Bound ()): Exclusive, up to but not including the next major version (${version;+;${@}}).

${@} is a placeholder for a version calculated by bnd. But this is not my specialty.

@pkriens, you have some additional thoughts?

chrisrueger added a commit to chrisrueger/bnd that referenced this issue Nov 19, 2024
fixes bndtools#6372 by fixing a broken link and adding links to interconnect pages related to version ranges.

Signed-off-by: Christoph Rueger <[email protected]>
chrisrueger added a commit to chrisrueger/bnd that referenced this issue Nov 19, 2024
fixes bndtools#6372 by fixing a broken link and adding links to interconnect pages related to version ranges.

Signed-off-by: Christoph Rueger <[email protected]>

add example
chrisrueger added a commit to chrisrueger/bnd that referenced this issue Nov 19, 2024
fixes bndtools#6372 by fixing a broken link and adding links to interconnect pages related to version ranges.

Signed-off-by: Christoph Rueger <[email protected]>

add example

add more example
@chrisrueger
Copy link
Contributor

@bric3 I have merged PR #6373 . Besides fixing and adding links I also added some more examples to https://bnd.bndtools.org/macros/range.html#examples
Maybe this is helpful

@bric3
Copy link
Author

bric3 commented Nov 20, 2024

Thank you @chrisrueger

bric3 added a commit to mockito/mockito that referenced this issue Nov 21, 2024
bric3 added a commit to mockito/mockito that referenced this issue Nov 29, 2024
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 a pull request may close this issue.

2 participants