Add -rebuildtriggerpolicy Eclipse preference#7289
Closed
chrisrueger with Copilot wants to merge 2 commits into
Closed
Add -rebuildtriggerpolicy Eclipse preference#7289chrisrueger with Copilot wants to merge 2 commits into
-rebuildtriggerpolicy Eclipse preference#7289chrisrueger with Copilot wants to merge 2 commits into
Conversation
After building a project's JAR, compute a timeless content digest and compare with the previously stored digest. If the content is unchanged, preserve the old JAR's timestamp. This prevents dependent projects from seeing a newer timestamp and triggering unnecessary rebuilds. The optimization uses Jar.getTimelessDigest() which ignores build-time-specific data (BND_LASTMODIFIED, version qualifier) to determine if the meaningful content has changed. A .digest sidecar file stores the hex digest alongside each build output. Agent-Logs-Url: https://github.com/bndtools/bnd/sessions/662b413c-3754-4104-a50f-cb8503721220 Signed-off-by: Christoph Rueger <chrisrueger@gmail.com> Co-Authored-By: chrisrueger <188422+chrisrueger@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Eclipse preferences UI checkbox for rebuild trigger policy
Add Eclipse preferences UI for Jun 24, 2026
-rebuildtriggerpolicy setting
Copilot
AI
changed the title
Add Eclipse preferences UI for
Add Eclipse preferences UI for Jun 24, 2026
-rebuildtriggerpolicy setting-rebuildtriggerpolicy and wire it to the bnd workspace
chrisrueger
force-pushed
the
copilot/add-rebuild-trigger-policy-checkbox
branch
from
June 24, 2026 20:46
a27dd3f to
950c1f9
Compare
Copilot
AI
changed the title
Add Eclipse preferences UI for
Add "Default" option to rebuild trigger policy preference
Jun 24, 2026
-rebuildtriggerpolicy and wire it to the bnd workspace
Copilot
AI
changed the title
Add "Default" option to rebuild trigger policy preference
Fix Jun 24, 2026
-rebuildtriggerpolicy Eclipse preference not surviving workspace refresh
Adds a new 'Rebuild Trigger Policy' dropdown to the Bnd Build preferences page, letting users choose between 'Always rebuild' and 'API-based (skip if API unchanged)' without editing cnf/build.bnd. Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
chrisrueger
force-pushed
the
copilot/add-rebuild-trigger-policy-checkbox
branch
from
June 24, 2026 22:05
ebdeee4 to
43c4387
Compare
-rebuildtriggerpolicy Eclipse preference not surviving workspace refresh-rebuildtriggerpolicy Eclipse preference
chrisrueger
marked this pull request as ready for review
June 24, 2026 22:06
Contributor
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.
Workspace.refresh()callsProcessor.forceRefresh(), which recreates the propertiesMapwholesale frombuild.bnd, silently wiping anysetProperty()overrides. The Eclipse preference for-rebuildtriggerpolicywas being set once increateWorkspace()but lost on the first workspace refresh (triggered by anycnf/file change viaCnfWatcher).setOffline()does not have this problem because it stores state in anAtomicBooleanfield — unaffected by refresh.setProperty()writes into thePropertiesobject that gets recreated.Changes
BndPreferences— add "Default" option"always"to""(empty = Default)build.bnd"; Eclipse only takes precedence when the user explicitly picksAlwaysorAPI-basedisRebuildTriggerPolicyDefault()helper;setRebuildTriggerPolicy("")now callsworkspace.unsetProperty()so any previously forced value is clearedBndBuildPreferencePage— expose the Default option in the UI"Default (use build.bnd setting)"as the first combo item (index 0);Always rebuild→ 1,API-based→ 2Central.applyRebuildTriggerPolicy(Workspace)— survive refreshREBUILDTRIGGERPOLICYbased on the current preferenceworkspace.refresh()from the Eclipse side:createWorkspace()— initial baselineCnfWatcher.processEvent()— user editsbuild.bndor other cnf filesCentral.adjustWorkspace()— workspace directory changes (both branches, insidewriteLocked)BndtoolsBuilder.build()cnf-project build job — workspace refreshed after cnf bundle rebuild