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

cnf change: prevent full build although 'Build automatically' is disabled #6391

Conversation

chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Dec 6, 2024

This improves the DX in the following scenario:

When you edit any file inside the cnf folder like /cnf/build.bnd and you Save the file before this fix, a FULL build was always triggered (by CnfWatcher.java), even if Project / Build Automatically was disabled. (and such a build can take very long and can become anoying in cases where you need tweak build.bnd)

Now a build is only triggered if Build Automatically is enabled. This at least gives the developer a knob to disable the build-on-change behavior in cases where you work on the file and want to save it a few times along the way (without waiting for a build everytime)

image

A warning is written the Error Log to make it visible somewhere:

image

Note: The "Reload Workspace" Button in the Bndtools Explorer is also affected by this change and does not trigger a FULL build if Build Automatically setting is disabled. This behavior is still handy as a "Reload Workspace without build" could still do some useful work like validation e.g. to add Problem markers.

The tooltip of the "Reload workspace" button now mentions the build behavior:

image

@chrisrueger chrisrueger marked this pull request as draft December 6, 2024 22:47
This improves the DX in the following scenario:
When you edit /cnf/build.bnd and you Save the file before this fix a FULL build was always triggered, even if Project / Build Automatically was disabled. (and such a build can take very long and can become anoying in cases where you need tweak build.bnd)
Now a build is only triggered if Build Automatically  is enabled. This at least gives the developer a knob to disable the build-on-change behavior in cases where you work on the file and want to save it a few times along the way.

Note: The "Reload Workspace" Button in the Bndtools Explorer is not affected by this change and still triggeres a FULL build regardless of the Build Automatically setting (which is desired, because this Reload Button should act like a 'force build'

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

Revert "cnf change: prevent build disabling 'Build automatically'"

This reverts commit dcd301e.

cnf change: prevent build when 'Build automatically' is disabled

This improves the DX in the following scenario:
When you edit /cnf/build.bnd and you Save the file before this fix a FULL build was always triggered, even if Project / Build Automatically was disabled. (and such a build can take very long and can become anoying in cases where you need tweak build.bnd)
Now a build is only triggered if Build Automatically is enabled. This at least gives the developer a knob to disable the build-on-change behavior in cases where you work on the file and want to save it a few times along the way.

Note: The "Reload Workspace" Button in the Bndtools Explorer is also affected by this change and does not trigger a FULL build. This behavior is useful so that validation of cnf/build.bnd kicks in and you see e.g. Problem markers, without triggering a build

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger force-pushed the respect-build-automatically-for-workspace-reload branch from dcd301e to 9ad0381 Compare December 7, 2024 13:54
@chrisrueger chrisrueger requested a review from pkriens December 7, 2024 13:59
@chrisrueger chrisrueger marked this pull request as ready for review December 7, 2024 13:59
@pkriens
Copy link
Member

pkriens commented Dec 9, 2024

LGTM

@chrisrueger chrisrueger merged commit 65e013b into bndtools:master Dec 9, 2024
9 checks passed
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.

2 participants