Skip to content

Refactor nanopb.bzl and encapsulate similar functionality #3484

@Andrewyx

Description

@Andrewyx

Description of the task

nanopb.bzl implements the nanopb_proto_library rule and is extremely complicated. It uses protoc and the nanopb plugin to generate nanopb proto libs, a zip containing our nanopb.c and nanopb.h for ESPs, and C++ artifacts for cc_library targets.

Specifically, this rule outputs the following 3 bazel types:

  1. DefaultInfo : For flashing onto ESPs
  2. CcInfo: C++ output artifacts
  3. PlatformIOLibraryInfo: For platformio_rules

We should separate the internal logic for performing these three actions, so that this already difficult to read code is more maintainable.

Acceptance criteria

  • nanopb.bzl should be SOLID

Blocked By

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevOpsFor everything related to logistics of codeDifficulty - 7Well-defined tasks that require some understanding about the relevant system and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions