OvermindDL1/protocol_ex

Return of the aliases

jjl opened this issue · 9 comments

jjl commented

Elixir becomes unaware that an alias in the enclosing scope of a defimplEx is used now:

alias Bricks.Connector
alias Bricks.Connector.Tcp
defimplEx TcpConnector, %Tcp{}, for: Connector do

Gives these warnings:

warning: unused alias Connector
  lib/connectors/tcp.ex:4
warning: unused alias Tcp
  lib/connectors/tcp.ex:5

I haven't tried, but I expect this applies to defprotocolEx too

Ooo that is because the module is generated 'out of band', hmm, how to use it... Just add a dummy nop expression I guess since I can't access the prior functions to mark them as used...

jjl commented

Yeah, I figured this one might be out of your control :)

Nah, I can fix it, I'll just need to generate some dummy code since apparently Elixir's compiler doesn't mark things as used with recursive compile calls. ^.^;

If you'll be able to test it here soon? It's harder to get warnings in tests without resorting to compilation inside tests and such annoyances (though I really should set that up...). :-)

jjl commented

Sure, I can test pretty quickly

Alright, can you give it a try from master real quick? You can just comment out the current dep and put in {:protocol_ex, github: "overminddl1/protocol_ex"} for now, this may require some rapid iteration, if you are on irc you can talk to me there, hopping on to my bouncer now. :-)

And confirmed fixed on IRC, closing in 0b35e8b. :-)

Aaaand maybe not fixed, re-opening...

How's master acting for you?

jjl commented

Confirmed fixed