OvermindDL1 / protocol_ex

Elixir Extended Protocol
https://hex.pm/packages/protocol_ex
48 stars 5 forks source link

Handle multiple beam files for the same module in releases #60

Closed marcelotto closed 3 years ago

marcelotto commented 3 years ago

Here's my naive shoot to fix #59 .

First, I noticed that the files in rel/ are much smaller, so I assumed that these are stripped down versions of the ones in lib/ for the release without debug info etc. Although I couldn't find any definitive answer, the beam_lib module IMO strongly bakes my assumption that these are produced from the former. So, if my assumption is correct it should be sufficient to take just the first element with the beam file in lib/.

I've tried this version and everything seems to work fine. The protocol dispatching can be applied successfully in the release.

OvermindDL1 commented 3 years ago

Greets, sorry for the delay, I often don't have a GUI much anymore to check websites like this with (I checked this due to your email, thanks for that!)... ^.^;

I need to find a good github cli sometime that can give me push notifications from it...

Taking the first one could work if the result is sorted first (lib sorts before rel after all) since the OS can theoretically return any order from the glob, and then take the first if multiple, this is an easy update to your PR, I'll do it now and post another message here after a quick test on that too. :-)

But yep, otherwise a great PR! :-)

Hold on while I make that change and test....

OvermindDL1 commented 3 years ago

Looks good on my simple test, merging and publishing with a version bump, few minutes...

OvermindDL1 commented 3 years ago

Published 0.4.4. Please test locally? :-)

marcelotto commented 3 years ago

I've tested it locally and everything seems to work fine. Thanks.