Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite packbeam.c #1429

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

jakub-gonet
Copy link
Contributor

@jakub-gonet jakub-gonet commented Dec 27, 2024

I went and implemented my suggestion from #1394.
I didn't do any thorough checks yet since I want to get feedback first (make -j in build/ doesn't crash on my machine).
Worked on original file, slowly refactoring to what I had in mind. Do we have tests for packbeam or we only check it by usage?

Leaving all commits for now, will squash after acceptance.

  1. Added TRY macro that checks bool output from expression and if false, stops the execution of current function.
  2. Various functions have additional bool output to check for errors.
  3. Refactored error output, printing usage when it makes sense (maybe should've used perror for internals?).
  4. Added TODOs for things that would change the structure stronger that I wanted for now.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@jakub-gonet jakub-gonet changed the title Rewrite packbeam Rewrite packbeam.c Dec 27, 2024
@jakub-gonet
Copy link
Contributor Author

jakub-gonet commented Dec 27, 2024

I did expect some CI to fail but not pretty much everything. How can I test it locally? I was doing make clean && make -j inside build/ for local testing (using MacOS).

In any case, I'll try to pin down the issue. You don't need to do full review, just let me know if approach is sane.

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.

1 participant