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

iox-#2372: Depend on @ncurses when building with Bazel #2373

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

lalten
Copy link
Contributor

@lalten lalten commented Nov 15, 2024

Notes for Reviewer

Depend on third-party @ncurses when building with Bazel. This is easy with Bzlmod, but I went the hard path and made it work for legacy Workspace as well.

Testing:

bazel run //tools/introspection:iox-introspection-client --enable_bzlmod --noenable_workspace -- --version
INFO: Analyzed target //tools/introspection:iox-introspection-client (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //tools/introspection:iox-introspection-client up-to-date:
  bazel-bin/tools/introspection/iox-introspection-client
INFO: Elapsed time: 0.061s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/tools/introspection/iox-introspection-client --version
Latest official iceoryx release version: 2.95.3bazel run //tools/introspection:iox-introspection-client --noenable_bzlmod --enable_workspace -- --version
INFO: Analyzed target //tools/introspection:iox-introspection-client (71 packages loaded, 3237 targets configured).
INFO: Found 1 target...
Target //tools/introspection:iox-introspection-client up-to-date:
  bazel-bin/tools/introspection/iox-introspection-client
INFO: Elapsed time: 8.044s, Critical Path: 2.81s
INFO: 138 processes: 8 internal, 130 linux-sandbox.
INFO: Build completed successfully, 138 total actions
INFO: Running command line: bazel-bin/tools/introspection/iox-introspection-client --version
Latest official iceoryx release version: 2.95.3

Note also the change from ncurses.h vs curses.h. There is some background info in https://stackoverflow.com/questions/59555474/difference-between-the-headers-ncurses-h-and-curses-h
The issue is mostly that ncurses.h isn't available in the current BCR ncurses.
There are no implementation differences iiuc.

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section including API breaking changes
  4. Branch follows the naming format (iox-123-this-is-a-branch)
  5. Commits messages are according to this guideline
  6. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. Assign PR to reviewer

Checklist for the PR Reviewer

  • Consider a second reviewer for complex new features or larger refactorings
  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.69%. Comparing base (d628cb7) to head (9d8ed97).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2373      +/-   ##
==========================================
- Coverage   78.70%   78.69%   -0.01%     
==========================================
  Files         440      440              
  Lines       16981    16981              
  Branches     2361     2361              
==========================================
- Hits        13365    13364       -1     
  Misses       2736     2736              
- Partials      880      881       +1     
Flag Coverage Δ
unittests 78.49% <ø> (-0.01%) ⬇️
unittests_timing 15.37% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...nclude/iceoryx_introspection/introspection_app.hpp 0.00% <ø> (ø)

... and 1 file with indirect coverage changes

---- 🚨 Try these New Features:

@elfenpiff
Copy link
Contributor

@lalten from my side it looks fine, except that the ubuntu bazel build fails.

I assigned @elBoberido to this PR since he is the one with the most bazel experience.

Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for fixing this. I think you need to add the license header to the new files. You can use bazel run //:buildifier_lint_check to locally check whether the CI will accept the bazel files and bazel run //:buildifier to fix the formatting.

bazel/ncurses/ncurses.BUILD Show resolved Hide resolved
bazel/ncurses/repositories.bzl Show resolved Hide resolved
Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. You need to rebase in order to make the CI run. If it's green, this can be merged.

@elBoberido elBoberido merged commit e693cc2 into eclipse-iceoryx:main Nov 18, 2024
22 checks passed
@lalten lalten deleted the iox-2372 branch November 18, 2024 19:08
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.

Use BCR @ncurses instead of relying on host's
3 participants