Skip to content

Introduce function-level pruning algorithm - #65

Open
pguyot wants to merge 1 commit into
atomvm:masterfrom
pguyot:w38/prune-functions
Open

pguyot wants to merge 1 commit into
atomvm:masterfrom
pguyot:w38/prune-functions

Conversation

@pguyot

@pguyot pguyot commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Works better with atomvm/AtomVM#2404

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

@pguyot
pguyot force-pushed the w38/prune-functions branch from 2170cd0 to c42c932 Compare September 25, 2026 15:09

@UncleGrumpy UncleGrumpy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should also update UPDATING.md with the change in pruning behavior, since this could break some apps that expect module level pruning - especially where some functions from a module not called directly by the app are expected to be available for use as disterl rpc calls.

We way want to open an issue after this merges to automate the regeneration of src/packbeam_drivers.hrl from the AtomVM repo, so master stays in sync with AtomVM current release branch or main - which is something we will need to decide on since sometimes they diverge quite far.

Comment thread src/packbeam_prune.erl Resolved
Comment thread src/packbeam_prune.erl Resolved
Comment thread src/packbeam_beam.erl Resolved
Comment thread src/packbeam_prune.erl Resolved
Comment thread src/packbeam_drivers.erl Resolved
Comment thread src/packbeam_beam.erl Resolved
Comment thread src/packbeam_api.erl Resolved
@pguyot
pguyot force-pushed the w38/prune-functions branch from c42c932 to 50aabee Compare October 10, 2026 17:21
@pguyot

pguyot commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

We way want to open an issue after this merges to automate the regeneration of src/packbeam_drivers.hrl from the AtomVM repo, so master stays in sync with AtomVM current release branch or main - which is something we will need to decide on since sometimes they diverge quite far.

Very true. And I realize that what I created didn't match the release branch. Let's use a CI script for this.

@pguyot
pguyot force-pushed the w38/prune-functions branch 2 times, most recently from f97d837 to a2120f2 Compare October 10, 2026 17:25

@UncleGrumpy UncleGrumpy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since this was a large and complicated PR, I had CodeRabbit do a review and a few things turned up, several of which may need to be checked for validity.

Comment thread src/packbeam.erl Resolved
Comment thread src/packbeam_beam.erl Resolved
Comment thread src/packbeam_beam.erl Resolved
Comment thread src/packbeam_relevance.erl Resolved
@UncleGrumpy

Copy link
Copy Markdown
Collaborator

We also may want to broaden the test scope to cover any cases that would have failed before these requested changes to prevent any future regression.

@pguyot
pguyot force-pushed the w38/prune-functions branch 3 times, most recently from b211b79 to 12d1cfe Compare October 19, 2026 05:11
Comment thread test/packbeam_review_tests.erl Resolved
Comment thread test/packbeam_review_tests.erl Resolved
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@pguyot
pguyot force-pushed the w38/prune-functions branch from 12d1cfe to dded530 Compare November 1, 2026 17:11
@UncleGrumpy

Copy link
Copy Markdown
Collaborator

I also just realized that I forgot to ask you to update the CHANGELOG, since this is a very significant change =-)

This branch has not been deployed

No deployments
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.

2 participants