Skip to content

fix(engine): preload deps and don't prune code paths#768

Merged
scohen merged 1 commit into
mainfrom
scohen/remove-module-pruning
Jul 9, 2026
Merged

fix(engine): preload deps and don't prune code paths#768
scohen merged 1 commit into
mainfrom
scohen/remove-module-pruning

Conversation

@scohen

@scohen scohen commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I found a doozy of a bug when compiling a work project. For reasons, one of our erlang libraries is a fork of a well-known http client, but its application name isn't the same as the library's app name.

Another dep does checks for the client module being present, and if it's present, then reads the app config's vsn with the library's name. The problem is there is no app config, since the app name doesn't match the library name. This causes the build to fail, but only in expert.

The reason is that expert has previously loaded the app name when compiling other deps, and because module pruning was disabled, that old dep carried through and caused the compile issue. This does not happen on the command line, because when the project stack changes, the dep's modules are unloaded.

Expert originally disabled module pruning because it needs to have its own deps' modules available, but this can be accomplished by passing an argument to the project-level builds instead of always doing it when we need to be in a mix context.

I found a doozy of a bug when compiling a work project. For reasons,
one of our erlang libraries is a fork of a well-known http client, but
its application name isn't the same as the library's app name.

Another dep does checks for the client module being present, and if
it's present, then reads the app config's vsn with the library's
name. The problem is there is no app config, since the app name
doesn't match the library name. This causes the build to fail, but
only in expert.

The reason is that expert has previously loaded the app name when
compiling other deps, and because module pruning was disabled, that
old dep carried through and caused the compile issue. This does not
happen on the command line, because when the project stack changes,
the dep's modules are unloaded.

Expert originally disabled module pruning because it needs to have its
own deps' modules available, but this can be accomplished by passing
an argument to the project-level builds instead of always doing it
when we need to be in a mix context.
@scohen scohen requested a review from doorgan July 9, 2026 01:21
@scohen scohen changed the title fix(engine): Preload deps and don't prune code paths fix(engine): preload deps and don't prune code paths Jul 9, 2026

@doorgan doorgan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and it works

@scohen scohen merged commit ccce6af into main Jul 9, 2026
50 of 51 checks passed
@scohen scohen deleted the scohen/remove-module-pruning branch July 9, 2026 03:30
@expert-backports

Copy link
Copy Markdown

Successfully created backport PR for v0.1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants