Stack has supported hpack's package.yaml configuration files since at least around this commit, as far as I can tell, but there's not much documentation about the differences between it and the stack.yaml file.
One of the few links I've found talking about it is this documentation, where it says:
package.yamlis a file format supported by hpack. It adds some niceties on top of cabal. For example, hpack has YAML syntax support and will automatically generate ofexposed-moduleslists. However, it's just a frontend to cabal package files.
So from this, it seems like package.yaml provides a superset of the *.cabal file's configuration ability, like the stack.yaml file also does.
The documentation here implies stack.yaml is the configuration file:
Next, let's look at our stack.yaml file, which gives our project-level settings.
...and later says that package.yaml is for storing dependencies:
To tell stack to use
text, you need to add it to yourpackage.yamlfile — specifically in your dependencies section...
There's this related question, but it sadly doesn't clarify the difference between the two files.
I've been using package.yaml for all my project's configurations, and never using stack.yaml.
So, what is the relationship between stack's package.yaml and stack.yaml files? If/when their responsibilities overlap, which is it better practice to use?