You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rebar.lock reports the app name instead of the Hex package name for renamed packages #175
In a rebar.lock entry of the form {<<"app">>,{pkg,<<"package">>,<<"version">>},Level}, the app and package names differ when rebar.config declares a dependency as {jiffy, "1.1.1", {pkg, jiffy_fork}}, which installs the Hex package jiffy_fork under the application name jiffy. rebarPkgRegex in internal/rebar/rebar.go has a capture group for the first name only, so this entry:
is returned by Parse as jiffy at 1.1.1 with the PURL pkg:hex/jiffy@1.1.1, while the installed Hex package is jiffy_fork. The rebar.config parser in #174 returns pkg:hex/jiffy_fork for the same dependency, so the manifest and lockfile of one project would produce two different PURLs for it.
Capturing the name inside {pkg, ...} and using it for Name fixes this and changes the Name and PURL that callers receive for renamed packages; the lockfile test needs a renamed entry. rebar3 keys the pkg_hash and pkg_hash_ext sections by the app name (expand_locks in apps/rebar/src/rebar_config.erl), so the integrity lookup in rebarPackageHashes needs the first capture as its key.
Activity