Skip to content

No documentation page for -versionpolicy instruction #6372

Closed

Description

@bric3

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.

Activity

  1. chrisrueger commented on Nov 17, 2024

    @chrisrueger
    Contributor

    @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.

  2. added a commit that references this issue on Nov 17, 2024
    e05003f
  3. bric3 commented on Nov 18, 2024

    @bric3
    Author

    @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.

  4. chrisrueger commented on Nov 18, 2024

    @chrisrueger
    Contributor

    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?

  5. added 4 commits that reference this issue on Nov 19, 2024
    3a370eb
    5de69cf
    93c8814
    817977c
  6. chrisrueger commented on Nov 19, 2024

    @chrisrueger
    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

  7. bric3 commented on Nov 20, 2024

    @bric3
    Author

    Thank you @chrisrueger

  8. added a commit that references this issue on Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions