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

Use the main project to let bnd compute the output file #4671

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Feb 1, 2025

Currently we compute the name of the subjar manually, but this can be overridden by the user so it is better to let bnd calculate the file itself.

FYI @chrisrueger

@laeubi laeubi added the backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change label Feb 1, 2025
@laeubi laeubi enabled auto-merge (rebase) February 1, 2025 09:40
@chrisrueger
Copy link
Contributor

chrisrueger commented Feb 1, 2025

I can confirm that this PR fixes our build which has set:

target-dir=generated${if;${driver;eclipse};;/${driver}}

(see related https://bnd.bndtools.org/chapters/150-build.html#avoiding-target-dir-conflicts-between-different-build-tools )

Only thing I noticed is that it generates a folder generated/unset/

image

I believe unset is from the ${driver} above which does seem to be populated with 'unset' or is not set. Not sure that is intended or correct. It seems that Eclipse identifies itself as eclipse. Not sure if it is possible that tycho populates it with eclipsetycho?

The idea behind this is that each build tool writes into its own folder so that different build tools (drivers) do not step on eachothers toes.

This seems how bnd gets and sets the driver:

Gradle plugin seems to set it here:
https://github.com/bndtools/bnd/blob/master/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndWorkspacePlugin.java#L169

Copy link

github-actions bot commented Feb 1, 2025

Test Results

  606 files  ±0    606 suites  ±0   4h 13m 45s ⏱️ + 4m 16s
  434 tests ±0    426 ✅ ±0   7 💤 ±0  1 ❌ ±0 
1 302 runs  ±0  1 278 ✅  - 1  22 💤 ±0  2 ❌ +1 

For more details on these failures, see this check.

Results for commit b63700a. ± Comparison against base commit 6d565f3.

♻️ This comment has been updated with latest results.

@laeubi laeubi disabled auto-merge February 1, 2025 11:25
@laeubi laeubi force-pushed the let_bnd_compute_output_name branch from 54c8df8 to 5c2d8c2 Compare February 1, 2025 11:28
Currently we compute the name of the subjar manually, but this can be
overridden by the user so it is better to let bnd calculate the file
itself. Additional init the global driver property of workspace.
@laeubi laeubi force-pushed the let_bnd_compute_output_name branch from 5c2d8c2 to b63700a Compare February 1, 2025 11:30
@laeubi
Copy link
Member Author

laeubi commented Feb 1, 2025

The driver name is now init with "tycho-maven-build"

@laeubi laeubi enabled auto-merge (rebase) February 1, 2025 13:42
@laeubi laeubi merged commit c87caeb into eclipse-tycho:main Feb 1, 2025
12 of 15 checks passed
@eclipse-tycho-bot
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants