cps-org / cps-org/cps-config

Test "component diamond" is failing on MacOS

Open
#80 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21
Forks
8
PR merge metrics
No merged PRs in 30d

Description

I installed cps-config on MacOS and ran `ninja -C builddir test`.
All tests passed however only `component diamond` generated reversed order result:

```
▶ 4/4 - component diamond FAIL
4/4 pkg-config compatibility FAIL 0.08s 19/20 subtests passed
>>> CPS_PATH=/Users/cyang571/src/cps-config/tests/cases ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=161 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /opt/homebrew/bin/python /Users/cyang571/src/cps-config/builddir/../tests/runner.py ./cps-config tests/cases.toml
――――――――――――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――――――――――――
stderr:
component diamond:
returncode: 0
stdout: -I/opt/include -I/something
expected: -I/something -I/opt/include
stderr:
command: ./cps-config diamond --cflags-only-I
```

I'm not sure if this problem only happen in MacOS, however the expected result `-I/something -I/opt/include` makes more sense for me, while it follows the "requires" order:
```
## Quoted from diamond.cps
needs-components1 -> multiple-components -> sample3 -> /something
needs-components2 -> multiple-components -> sample2 -> /opt/include
```
Does it make sense to find some way to guarantee the order of "requires"?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with `ninja -C builddir test`, then inspect `tests/cases.toml`, `tests/runner.py`, and the quoted `diamond.cps` case. Run `./cps-config diamond --cflags-only-I` and trace how the two `requires` paths are collected and ordered. Done means the intended ordering is established and the component-diamond test passes consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
cli, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.