Open stevendanna opened 5 years ago
For whoever picks this up, it might be worth mentioning that pkg_path_for (in plans) does look to pkgDeps, but pkgPathFor (in hooks and config) looks to TDEPS. I don't know if that is the intended behavior, but it is the behavior I observed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
It is very comfortable in a wrapper package that you can relay on TDEPS - it just handy. However, for reliability it better to explicitly use DEPS, not TDEPS. TDEPS may change after upgrade and package you are relaying on might go away.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
The documentation for pkgPathFor (https://www.habitat.sh/docs/reference/#pkgpathfor-helper) says:
However, pkgPathFor actually pulls from the TDEPS of a package meaning that it will return valid results for packages which aren't listed in pkg_deps but are transitive dependencies of packages listed in pkg_deps.
While this might have been a bug originally, it is actually very useful for "wrapper" packages in which you may need to replicate hooks from the underlying packages but don't want to introduce constant version conficts by depending directly on script dependencies.
If we are OK with the current behavior (it would be hard to change now as it would mean some set of older package would no longer run), then let's update the documentation.