Skip to content
This repository has been archived by the owner on Apr 7, 2018. It is now read-only.

Default protocols are not replaced by consolidated in release. #404

Closed
jakkra opened this issue Dec 21, 2016 · 3 comments
Closed

Default protocols are not replaced by consolidated in release. #404

jakkra opened this issue Dec 21, 2016 · 3 comments

Comments

@jakkra
Copy link

jakkra commented Dec 21, 2016

I opened an issue on Ecto, since I thought that was the problem. But it seems to be something with the release. We are using Windows, and it doesn't look like Distillery supports that yet, otherwise I would try it first.

Project to reproduce https://github.com/jakkra/ecto_insert_all_issue_reproduce.

Protocol.consolidated?(String.Chars) returns false in release console.

Relevant code can be found in page_controller.ex.

Any idea how I can solve this?

@jthure
Copy link

jthure commented Jan 9, 2017

I believe I found out whats wrong. The consolidated protocols are placed in lib\appname-ver\consolidated, which are not in the path, returned by :code.get_path. Furthermore, checking where the Elixir.String.Chars.beam file is for with :code.where_is_file('Elixir.String.Chars.beam') it returns the path lib\elixir-ver\ebin\Elixir.String.Chars.beam,

By moving the directory 'consolidated' from lib\appname-ver\ to lib, the directory appears in path and Protocol.consolidated?(String.Chars) returns true.

@thorsten-de
Copy link

Same issue here. Seems that the paths for consolidated protocols in the app.bat don't match the paths used in the app.sh...

@thorsten-de
Copy link

I defined @set consolidated=%release_root_dir%\lib\%rel_name%-%rel_vsn%\consolidated and used it when installing the service: set args=-setcookie %cookie% -pa \"%consolidated%\" %erl_opts% %conform_opts% ++ -rootdir \"%rootdir%\"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants