placing some code outside lib folder in a library pushed to hex.pm, is mix not able to resolve code placed in such a way ? i have published a library using
defp elixirc_paths(_), do: ["lib", "my_other_code"]
and it doesnt work… when i compile the library as dependency in another project, it fails to find the structs in my_other_code
Hex only bundles/uploads whitelisted folders, did you add your folder to there as well?
where do I configure that … or where do i find those whitelisted folders …
it might not be possible, ill take that
ah ok need to overrides files. Ok thanks. will test and give proper explanation of solution when found.
hmm if the default files is
# These are the default files included in the package
files: ~w(lib priv .formatter.exs mix.exs README* readme* LICENSE*
license* CHANGELOG* changelog* src),
then that means that mix.lock is not published? Why? Or maybe thats up to the host application/program to decide, what versions should be resolved?
Individual mix.lock
of dependencies are not relevant for constraint resolution.
Only the :deps
as specified in the projects project/1
kw-list are collected and then a recursive constraintsolver is ran over that.
If the individual mix.lock
s were considered, it would be very unlikely to ever resolve dependencies.
To describe it a bit differently. Dependencies are locked at the top level mix project scope only. So there’s no need for dependencies to ship their mix.lock files.
Thanks. I fixed it by specifying files in package.