Skip to content

Release 2.1.0#22

Merged
Ulrond merged 11 commits into
mainfrom
release/2.1.0
May 28, 2026
Merged

Release 2.1.0#22
Ulrond merged 11 commits into
mainfrom
release/2.1.0

Conversation

@Ulrond
Copy link
Copy Markdown
Contributor

@Ulrond Ulrond commented May 28, 2026

Release 2.1.0

Cuts the 2.1.0 release from develop to main via git-flow.

What lands

Compatibility

  • No public API change — the binder SDK's consumer-facing interface is unchanged. This is a build-tool behaviour fix.
  • Consumers: any repo on a prior tag using current and editing AIDL was at risk of shipping stale generated C++; consumers picking up 2.1.0 will see correct regen-on-build behaviour.

Merge plan

Admin-merge with --merge (not squash) so the Merge branch 'release/2.1.0' commit lands on main — matches existing release pattern. Then tag 2.1.0 on main and back-merge to develop.

Ulrond added 11 commits April 16, 2026 15:34
Release 2.0.0 2.0.0
Add getFirmwareLogFile() method to IFWManager to demonstrate
ParcelFileDescriptor as a built-in AIDL type in the C++ binder
framework. Proves end-to-end flow: AIDL compilation, C++ code
generation, and linking against libbinder.so.
Add O_NOFOLLOW | O_CLOEXEC flags to open() to prevent symlink attacks.
Propagate errno in error response for client-side diagnosis.
Add cerrno/cstring includes for strerror/errno.
…elfiledescriptor

feat: extend FWManager example with ParcelFileDescriptor (#16)
The "API dump does not exist" error path referenced `aidlInterface.baseName`,
which is not defined in scope — the local variable is `interface` and the
attribute is `base_name`. Hitting this path (e.g. a first-time/unfrozen
interface) raised a NameError instead of printing the intended guidance.

#19
Adds a `layout` knob to the interface definition so generated C++ and
versioned AIDL can live in the interface's own directory tree
(`<module>/<version>/`) instead of the central `stable/` tree. The
central layout remains the default; nothing existing changes.

- aidl_interface.py: `layout: module-local` (interface.yaml) points
  `interface_root_stable` / `interface_gen_dir` at the interface's
  module directory. The legacy `frozen_location` field is still
  honoured for back-compat. Store `workspace_root` (first interfaces
  root) and use it in `get_preprocessed_dir()` instead of the brittle
  `dirname x 3` derivation, which assumed a `stable/aidl/<module>` path.
- aidl_gen_rule.py: in module-local layout the version directory is the
  interface's own directory name (`current`, `0.1.0.0`, ...).
- CMakeLists.inc: decouple the generated-source base
  (`LINUX_BINDER_AIDL_GENERATED_ROOT`, new, defaults to
  `LINUX_BINDER_AIDL_ROOT_OUT`) from the intermediate `out/` directory,
  so a module-local consumer can resolve generated sources under its
  repo root while keeping intermediates separate.

Verified: an interface with `layout: module-local` generates C++ into
its own directory and builds; a default (central) interface is
unaffected.

#19
- aidl_api.py: update-api (-u) is a no-op in module-local layout — the
  AIDL already lives in its versioned directory, so the old rsync would
  copy the directory onto itself. Skip with an info message.
- aidl_gen_rule.py: reject -v/--version for a module-local interface
  with a clear error — the version is selected by which interface
  directory is built, not by a flag (it was previously ignored silently).
- CMakeLists.inc: document the LINUX_BINDER_AIDL_GENERATED_ROOT contract
  (must resolve to where the generator emits; a mismatch fails loudly at
  the post-generation re-check, never silently).

#19
…530)

Previously, the AIDL->C++ regeneration step in CMakeLists.inc only ran
when <module>/current/include and <module>/current/src were empty. Once
those directories held any pre-generated artefacts (from a prior build,
a stale checkout, or a snapshot copy) the regen was silently skipped -
even when the source AIDL had changed. Contributors edited AIDL, saw
"Build completed successfully", and shipped PRs whose committed
generated C++ did NOT match the AIDL they actually changed.

This commit applies Option A from rdk-halif-aidl#530:

  - Always regenerate when interface_version == "current". The AIDL
    compiler overwrites in place, so a fresh regen brings the tree to
    byte-equivalent state with the AIDL. Cost is negligible relative
    to compilation; deterministic regen eliminates the entire class of
    "ship stale generated code" bugs.
  - Frozen versions (e.g. 0.1.0.0) continue to skip regen when
    pre-committed sources exist - those are part of the release
    contract and must remain immutable.
  - Defensive fallback: if a regen run produces no files in the
    expected source_dir (e.g. a component whose loader maps to a
    different versioned directory), fall back to pre-committed
    sources with a WARNING rather than failing the build.

Additionally, host/aidl_interface.py now sorts the discovered
interface.yaml locations so that "<module>/current/interface.yaml"
is always inserted last into the aidl_interfaces dict. Without this,
filesystem-dependent os.walk order could leave the dict pointing at
a frozen snapshot's interface.yaml, causing the always-regen above
to write into the snapshot directory and dirty the working tree
(observed on audiomixer/0.1.0.1 and compositeinput/0.2.0.0 in
rdk-halif-aidl). Stable ordering keeps "current" canonical for the
generator regardless of underlying filesystem behaviour.

Verified against the rdk-halif-aidl#530 acceptance reproducer:
  1. Edit avclock/current/com/rdk/hal/avclock/IAVClock.aidl
     (added a probe method).
  2. Run ./build_modules.sh avclock from the rdk-halif-aidl checkout.
  3. git diff avclock/current/include/ now shows the regen reflecting
     the AIDL edit (previously: empty diff, stale C++ shipped).

./build_modules.sh all also builds 26 libraries clean with no working
tree changes in any snapshot directory.
Three small follow-ups to PR #21 surfaced by Copilot review:

1. Argument quoting (real bug). `interface_version_arg` was set as a
   single string `"-v ${interface_version}"`, so `execute_process`
   passed it to `aidl_ops.py` as one argv token. `aidl_ops.py` uses
   `getopt` and would reject the combined token on clean builds of a
   frozen version that lacks pre-committed sources. Switched to a
   CMake list (`set(interface_version_arg -v ${interface_version})`)
   so the flag and value expand to two separate argv entries.

2. Frozen-version comment. The doc string said frozen versions
   "never regenerate", which contradicted the elseif branch that
   bootstraps a frozen version once when no pre-committed sources
   exist. Tightened the comment to describe the actual two-state
   behaviour: reuse pre-committed sources when present, generate
   once to bootstrap otherwise.

3. Error message. Both FATAL_ERROR sites pointed at
   `./build_interfaces.sh`, which lives in the consumer repo
   (rdk-halif-aidl), not in linux_binder_idl. Removed the bogus
   suggestion and pointed users at the aidl_ops.py output above.
fix(build): always regenerate C++ from AIDL on build (rdk-halif-aidl#530)
…ted-output

feat: support module-local generated C++ output (#19)
Copilot AI review requested due to automatic review settings May 28, 2026 11:27
@Ulrond Ulrond requested a review from a team as a code owner May 28, 2026 11:27
@Ulrond Ulrond merged commit 2f7bfa8 into main May 28, 2026
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
@Ulrond Ulrond deleted the release/2.1.0 branch May 28, 2026 11:28
@Ulrond Ulrond review requested due to automatic review settings May 28, 2026 11:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant