jarlah
Placing code outside lib folder in hex package, possible?
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
Marked As Solved
LostKobrakai
Also Liked
LostKobrakai
Hex only bundles/uploads whitelisted folders, did you add your folder to there as well?
LostKobrakai
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.
NobbZ
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.locks were considered, it would be very unlikely to ever resolve dependencies.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #podcasts
- #code-sync
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









