Repository navigation
new -nosubstitution instruction to disable package substitution globally (comparable to -noimport:=true) - #6847
Merged
chrisrueger merged 1 commit intoOct 19, 2025
Conversation
chrisrueger
force-pushed
the
6844-add-instruction-to-disable-substitution
branch
from
October 1, 2025 08:48
f15c8ee to
da6cad3
Compare
chrisrueger
marked this pull request as ready for review
October 1, 2025 08:49
chrisrueger
force-pushed
the
6844-add-instruction-to-disable-substitution
branch
2 times, most recently
from
October 1, 2025 09:04
89f83ff to
0559e5f
Compare
chrisrueger
force-pushed
the
6844-add-instruction-to-disable-substitution
branch
2 times, most recently
from
October 4, 2025 06:52
6c9c0b6 to
8705b69
Compare
chrisrueger
force-pushed
the
6844-add-instruction-to-disable-substitution
branch
from
October 6, 2025 04:39
8705b69 to
63adc5f
Compare
Contributor
Author
|
Renamed it to |
chrisrueger
force-pushed
the
6844-add-instruction-to-disable-substitution
branch
from
October 6, 2025 10:52
63adc5f to
ad21dee
Compare
- allows to globally disable package substitution - generated docs for -nosubstitution instruction Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
chrisrueger
force-pushed
the
6844-add-instruction-to-disable-substitution
branch
from
October 6, 2025 11:22
ad21dee to
6174b24
Compare
Contributor
Author
|
Going to merge since no objections in the recent weeks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6844
This is about https://bnd.bndtools.org/chapters/170-versioning.html#substitution
Setting this new instruction to
-nosubstitution:truedisables package substitution globally (default isfalse). That means, that bnd does not calculateImport-Packagereferences for any package in exports.This is equivalent to
Export-Package: *;-noimport:=trueor-exportcontents: *;-noimport:=trueNote: This is an optional / opt-in feature. Nothing changes if you do not use it.
Why is it useful?
This new instruction is useful for library authors who never want to have any exported packages in Import-Package (example)
Example
or
This ensures that no
Import-Packageis calculated for any package inExport-PackageThe advantage is that
-nosubstitution:trueis a global switch, thus a developer cannot forget to add-noimport:=truein case of a more fine-grainedExport-Packagedeclaration with multiple packages.In the latter example even though
-noimport:=truedirective was forgotten, the-nosubstitution:truetakes care of it.@laeubi could give additional examples on use cases