Release 2.1.0#22
Merged
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 2.1.0
Cuts the 2.1.0 release from
developtomainvia git-flow.What lands
<module>/current/{include,src}/placement in consumer repos (rdkcentral/rdk-halif-aidl).host/CMakeLists.incnow always invokesaidl_ops.py -gfor thecurrentpath; frozen versions still skip-if-pre-committed;interface.yamldiscovery is stable-sorted so the always-regen never clobbers a frozen snapshot dir.Compatibility
currentand 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 theMerge branch 'release/2.1.0'commit lands on main — matches existing release pattern. Then tag2.1.0on main and back-merge to develop.