Run hab -r aliased dump app/none -v. You should see aliased listed in the versions section, but do not.
Solution
The issue is caused due to FlatConfig.versions early out if self.distros is NotSet. Re-work how forced_requirements is respected, preserving the WARNING:hab.solvers:Forced Requirement: aliased logging warning as this is a developer convenience and should not be used by general users.
I think the forced requirements should be included in distros, but that will take a bit of a refactor.
Summary
If your config file doesn't define or inherit distros, you can't force requirements with
hab -r
.Expected Behavior
Given this hab command and the test setup, you should see:
What you actually see(ie no aliases ):
Steps to Reproduce Behavior
HAB_PATH
to yourtests\site_main.json
tests\configs\app\app_none.json
hab -r aliased dump app/none -v
. You should see aliased listed in the versions section, but do not.Solution
The issue is caused due to
FlatConfig.versions
early out ifself.distros
is NotSet. Re-work howforced_requirements
is respected, preserving theWARNING:hab.solvers:Forced Requirement: aliased
logging warning as this is a developer convenience and should not be used by general users.I think the forced requirements should be included in distros, but that will take a bit of a refactor.
Environment
hab==0.12.0
Additional Context
See above