Skip to content

Document components design rules #637

Open

Description

@matentzn
  1. A component make target MUST NOT, directly or indirectly, depend on any ODK generated files/make targets, in particular not: imports, seeds, merged source files and other components.
  2. In the case you do have a logical dependency, you have to manage the dependency yourself by 1) generating the dependency with make first and 2) using the generated file in the make target of the dependent file (i.e. the component) without having an explicit make dependency.

Activity

  1. added this to the 1.3.3 milestone on Nov 13, 2022
  2. jamesamcl commented on May 21, 2023

    @jamesamcl

    What's the justification for these rules?

  3. gouttegd commented on May 21, 2023

    @gouttegd
    Contributor

    @udp: Avoiding circular dependencies.

    For example, generating the import modules requires, among other steps, extracting the “seed” file. That extraction in turn requires both the -edit file and all the declared components.

    If a component was dependent on an import module, you would end up in a situation where you would need to generate the imports before you can make the component, but you would need the component before you can generate the imports.

    Forbidding custom components from depending on other Make targets allows us to assume that such a conundrum cannot happen.

  4. modified the milestones: 1.5, 1.6 on Dec 7, 2023
  5. modified the milestones: 1.6, 1.7 on Mar 29, 2025
  6. removed this from the 1.7 milestone on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions