Skip to content

Proposal to manage visibility of subcomponents - #612

Draft
NicolasFussberger wants to merge 3 commits into
eclipse-score:mainfrom
etas-contrib:tighten_alivemonitor_visibility
Draft

Proposal to manage visibility of subcomponents#612
NicolasFussberger wants to merge 3 commits into
eclipse-score:mainfrom
etas-contrib:tighten_alivemonitor_visibility

Conversation

@NicolasFussberger

@NicolasFussberger NicolasFussberger commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The folder structure already highlights the intended visibility.
For example:

score/launch_manager/src/daemon/src/alive_monitor
├── BUILD
├── details                           // everything in here shall be private to the alive_monitor component
├── IAliveMonitor.hpp                 // API used by other components
├── ....                              // API used by other components
└── mock_supervision_factory.hpp      // API used by other components

To make this more explicit and to enforce it via bazel, this PR proposes to define two package groups in the top-level build file of the component:

# Packages allows to use the alive_monitor component API.
package_group(
    name = "api",
    packages = ["//score/launch_manager/src/daemon/..."],
)

# Everything else in this package is internal to the alive_monitor component.
# Visibility for everything in 'details' shall be :internal by default.
package_group(
    name = "internal",
    packages = ["//score/launch_manager/src/daemon/src/alive_monitor/..."],
)

The targets in score/launch_manager/src/daemon/src/alive_monitor/BUILD will get by default the visibility from "api" while the targets in score/launch_manager/src/daemon/src/alive_monitor/details will by default get visibility "internal".

The same pattern could be repeated for all (sub)components

@NicolasFussberger
NicolasFussberger force-pushed the tighten_alivemonitor_visibility branch from 404c800 to 97848b7 Compare September 8, 2026 06:21
@NicolasFussberger
NicolasFussberger deployed to workflow-approval September 8, 2026 06:21 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger deployed to workflow-approval September 8, 2026 06:21 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger changed the base branch from main to reenable_qnx_integration_tests September 11, 2026 05:58
@NicolasFussberger
NicolasFussberger force-pushed the tighten_alivemonitor_visibility branch from 97848b7 to cf25d86 Compare September 11, 2026 06:01
@NicolasFussberger
NicolasFussberger deployed to workflow-approval September 11, 2026 06:01 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger deployed to workflow-approval September 11, 2026 06:01 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger force-pushed the tighten_alivemonitor_visibility branch from cf25d86 to 11820d1 Compare September 11, 2026 06:13
@NicolasFussberger
NicolasFussberger changed the base branch from reenable_qnx_integration_tests to main September 11, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant