Skip to content

Conversation

elbeno
Copy link
Contributor

@elbeno elbeno commented Dec 10, 2024

Problem:

  • The dependency DAG between cib sub libraries is not well-defined.

Solution:

  • Define it. Each library "level" depends on the level below.

Level 0 libraries:

  • async
  • conc
  • fmt
  • stdx

Level 1 libraries:

  • cib_lookup depends on stdx
  • cib_nexus depends on stdx
  • cib_sc depends on fmt, stdx

Level 2 libraries:

  • cib_log depends on cib_sc
  • cib_match depends on cib_sc
  • cib_interrupt depends on conc, cib_sc

Level 3 libraries:

  • cib_flow depends on cib_log, cib_nexus, cib_sc
  • cib_log_fmt depends on cib_log
  • cib_msg depends on async, cib_log, cib_lookup, cib_match, cib_sc

Level 4 libraries:

  • cib_log_mipi depends on conc, cib_log, cib_msg
  • cib_seq depends on cib_flow, cib_log, cib_nexus, cib_sc

Level 5 libraries:

  • cib depends on cib_*

Note:

  • No code has moved, so includes remain valid. cib remains as an omnibus library. But this paves the
    way (if we want) to move code around and separate the libraries more.

Problem:
- `cib` offers `builder_meta` as a convenient way to provide a service. But
  sometimes other libs depend on cib only to use that, when instead they could
  be providing a service easily by modelling a concept.

Solution:
- Change `builder_meta` to a concept; libraries that don't need cib otherwise
  need not use it.
@elbeno elbeno changed the title Decouple cib builder_meta Refactor cib library structure Dec 10, 2024
@elbeno elbeno force-pushed the decouple-service branch 2 times, most recently from ca2f48c to fcd948b Compare December 10, 2024 18:40
Problem:
- The dependency DAG between `cib` sub libraries is not well-defined.

Solution:
- Define it. Each library "level" depends on the level below.

Level 0 libraries:
- `async`
- `conc`
- `fmt`
- `stdx`

Level 1 libraries:
- `cib_lookup` depends on `stdx`
- `cib_nexus` depends on `stdx`
- `cib_sc` depends on `fmt`, `stdx`

Level 2 libraries:
- `cib_log` depends on `cib_sc`
- `cib_match` depends on `cib_sc`
- `cib_interrupt` depends on `conc`, `cib_sc`

Level 3 libraries:
- `cib_flow` depends on `cib_log`, `cib_nexus`, `cib_sc`
- `cib_log_fmt` depends on `cib_log`
- `cib_msg` depends on `async`, `cib_log`, `cib_lookup`, `cib_match`, `cib_sc`

Level 4 libraries:
- `cib_log_mipi` depends on `conc`, `cib_log`, `cib_msg`
- `cib_seq` depends on `cib_flow`, `cib_log`, `cib_nexus`, `cib_sc`

Level 5 libraries:
- `cib` depends on `cib_*`

Note:
- No code has moved, so includes remain valid. `cib` remains as an omnibus library. But this paves the
  way (if we want) to move code around and separate the libraries more.
@elbeno elbeno force-pushed the decouple-service branch 2 times, most recently from e905cb0 to 28055ae Compare December 10, 2024 19:04
Copy link
Contributor

@lukevalenty lukevalenty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@bdeane-intel bdeane-intel merged commit 69595ab into intel:main Dec 10, 2024
22 checks passed
@elbeno elbeno deleted the decouple-service branch December 12, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants