Preserve the order of goals in rel file #812
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the systools documentation:
This allows a certain level of control of the application start
sequence, which, unfortunately, is not available if one is to generate
releases using relx, due to the use of an unordered container (map) to
store release app goals.
Say, you have two applications, without any dependencies between them,
that you'd like to include in the same release. The release spec would
then look like:
{release, {my_release, "0.0.1"}, [b_app, a_app]}
.Expectation is that, since there are no dependencies between them, b_app
would be first in the boot script, which is not the case due to the way
maps:to_list/0
currently works.This change adds an extra field to the
parsed_goal()
map, which storesthe index of the goal in the original release specification. Goals order
is then restored according to this index value prior to generating the
.rel file. No other functionality is affected.