facebookexperimental / object-introspection

Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
Apache License 2.0
163 stars 14 forks source link

nix: add building oid to the flake #502

Closed JakeHillion closed 2 months ago

JakeHillion commented 2 months ago

OI's build is challenging and has often been a problem for the Open Source community. It requires an extremely specific set of dependencies that are very hard to achieve on most systems. There are frequent breakages, like when updating to CentOS Stream 9, or when trying to update the CI's clang from clang-12 to clang-15 - OI requires the clang libraries to be version 15 but can't be compiled with it on the CI!

This changes provides a mostly working build environment with nix. This environment is pinned to a specific nixpkgs revision using flake.lock, and only updates when we explicitly tell it to.

Summary of changes:

Test plan:

This change requires less testing than previous build related changes because it deprecates most of the build types.

The list of exclusions for GitHub Actions/nix testing is currently very long, I think 29% of the tests. This should be stable and reproducible though, and likely needs deep changes to OI to fix. That's why fixes are excluded from this PR. It's all to do with the forked drgn not being able to parse clang's newer DWARF output, and can't be fixed by rolling back as we required a relatively new libcxx.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.79%. Comparing base (79dca16) to head (375f3bd). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #502 +/- ## ======================================= Coverage 60.78% 60.79% ======================================= Files 126 126 Lines 12491 12491 Branches 2014 2014 ======================================= + Hits 7593 7594 +1 + Misses 3941 3940 -1 Partials 957 957 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.