Open max-au opened 5 years ago
Inets is trickier because we have our own configs to handle deps for r3:compile()
commands particularly when the HTTP_PROXY and HTTPS_PROXY is enabled for httpc. You can see it explicitly blacklisted:
You can probably take it out to run experiments and see if that would make or break things on your end. If you feel it's workable and won't break functionality, I'm probably fine toggling it out.
I worked it around with inets:stop(), inets:start() in the shell, but it took me a while to find out. Feel free to close if you deem it as desired behaviour (might be worth documenting).
I'm open to either way. Mostly I was afraid of breaking rebar3 functionality, but now that I think about it, it should be possible to stop and restart inets, and reinsert our httpc config. It would maintain current behaviour, but allow fixing non-httpc inets use cases I believe.
I would very much appreciate it if inets could be taken out of the blacklist. That would make using sys.config more consistent and predictable.
Same issue as with SSL app in https://github.com/erlang/rebar3/issues/1754 But now it's "inets" application.
When inets configuration is in sys.config:
[ {inets, [ {services, [ {httpd, [ {port, 8080}, {server_name, "erlperf"}, {server_root, "/tmp"}, {document_root, "/tmp/htdocs"}, {bind_address, "localhost"} ]} ]} ]} ].
$ rebar3 shell <...>
inets:services(). [{httpc,<0.102.0>},{httpc,<0.99.0>}] 2> application:get_all_env(inets). [{services,[{httpd,[{port,8080}, {server_name,"erlperf"}, {server_root,"/tmp"}, {document_root,"/tmp/htdocs"}, {bind_address,"localhost"}]}]}] 3>
rebar3 starts inets dynamically, thus ignoring what is in sys.config for the application.