trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.88k stars 77 forks source link

Strip symbols from release binaries #777

Closed rnijveld closed 12 months ago

codecov[bot] commented 12 months ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (9f269f6) 55.33% compared to head (68871c6) 55.33%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #777 +/- ## ======================================= Coverage 55.33% 55.33% ======================================= Files 72 72 Lines 9837 9837 ======================================= Hits 5443 5443 Misses 4394 4394 ```

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

pvdrz commented 12 months ago

I reproduced this error locally by running cargo bloat --release:

Error: parsing failed cause 'section .symtab is missing'.

Given that cargo bloat is called as part of tweedegolf/cargo-dependencies-action. I see two ways forward:

squell commented 12 months ago
  • Add a new profile called dependencies-action (name is a WIP™️) and update cargo-dependencies-action so we can pass the profile we want to compile the project with using with:.
  • Leave the release profile untouched and add a new profile called publish or dist (name is a WIP™️) where we actually strip symbols and document that this is the profile to be used when packaging sudo-rs

I think option 2 would be very confusing (as an outsider, I would expect cargo build --release to give the most optimal build).

One other option would be to be very pragmatic and streamline our CI by simply removing this CI action. The "bloat" thing served its purpose when we had more than 3 dependencies (and those dependencies themselves had dependencies). Right now it feels like wasted CPU cycles in our CI.