title: Erlang shell stopped loading my modules
body: <p>This was working fine last week. I would open</p>
  
  <p><code>
  cd myprojectdir
  erl
  (erlang shell).
  c(room).
  {ok, R} = room:go().
  </code></p>
  
  <p>then I could use gen_server to send messages to R, interacting with my room module.</p>
  
  <p>I started in a cowboy routing branch. I was seeing things work fine, when I looked at it today I was getting compile errors. So I rolled back to my master branch. Still got errors in the shell, even rolling back a few commits, hm.</p>
  
  <p>When I try to call room:go(), the other modules are printed as <code>undef</code>. If I compile each of them in turn, then room:go() will work.</p>
  
  <p>room kicks off tables, tables kick off clocks, seats and game, game kicks off board and actions.</p>
  
  <p><a href="https://github.com/quantumproductions/tunnel" rel="nofollow noreferrer">https://github.com/quantumproductions/tunnel</a></p>
  
  <pre><code>2&gt; c(game).
  {ok,game}
  3&gt; game:go().
  ** exception exit: undef
       in function  board:go/0
          called as board:go()
       in call from game:init/1 (game.erl, line 57)
       in call from gen_server:init_it/6 (gen_server.erl, line 328)
       in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 247)
  4&gt; c(board).
  {ok,board}
  5&gt; game:go().
  ** exception exit: undef
       in function  actions:go/0
          called as actions:go()
       in call from game:init/1 (game.erl, line 58)
       in call from gen_server:init_it/6 (gen_server.erl, line 328)
       in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 247)
  6&gt; c(actions).
  {ok,actions}
  7&gt; actions:go().
  {ok,&lt;0.93.0&gt;}
  8&gt; game:go().
  {ok,&lt;0.95.0&gt;}
  9&gt; c(room).
  {ok,room}
  10&gt; room:go().
  ** exception exit: undef
       in function  table:go/0
          called as table:go()
       in call from room:tablePids/2 (room.erl, line 33)
       in call from room:init/1 (room.erl, line 80)
       in call from gen_server:init_it/6 (gen_server.erl, line 328)
       in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 247)
  11&gt; c(table).
  {ok,table}
  12&gt; room:go().
  ** exception exit: undef
       in function  clock:go/0
          called as clock:go()
       in call from table:init/1 (table.erl, line 7)
       in call from gen_server:init_it/6 (gen_server.erl, line 328)
       in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 247)
  13&gt; c(clock).
  {ok,clock}
  14&gt; room:go().
  ** exception exit: undef
       in function  seats:go/0
          called as seats:go()
       in call from table:init/1 (table.erl, line 8)
       in call from gen_server:init_it/6 (gen_server.erl, line 328)
       in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 247)
  15&gt; c(seats).
  {ok,seats}
  16&gt; room:go().
  ** exception exit: undef
       in function  hall:go/0
          called as hall:go()
       in call from room:init/1 (room.erl, line 81)
       in call from gen_server:init_it/6 (gen_server.erl, line 328)
       in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 247)
  17&gt; c(hall).
  {ok,hall}
  18&gt; room:go().
  {ok,&lt;0.159.0&gt;}
  19&gt;
  =ERROR REPORT==== 29-Jan-2017::17:37:45 ===
  Error in process &lt;0.169.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.159.0&gt;,update],[]}]}
  
  =ERROR REPORT==== 29-Jan-2017::17:37:46 ===
  Error in process &lt;0.170.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.159.0&gt;,update],[]}]}
  
  =ERROR REPORT==== 29-Jan-2017::17:37:47 ===
  Error in process &lt;0.171.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.159.0&gt;,update],[]}]}
  
  =ERROR REPORT==== 29-Jan-2017::17:37:48 ===
  Error in process &lt;0.172.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.159.0&gt;,update],[]}]}
  
  =ERROR REPORT==== 29-Jan-2017::17:37:49 ===
  Error in process &lt;0.173.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.159.0&gt;,update],[]}]}
  
  =ERROR REPORT==== 29-Jan-2017::17:37:50 ===
  Error in process &lt;0.174.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.159.0&gt;,update],[]}]}
  </code></pre>
  
  <p>Each go() function is just a convenience for</p>
  
  <pre><code>go() -&gt;
    gen_server:start_link(?MODULE, [], []).
  </code></pre>
  
  <p>Versioning:</p>
  
  <pre><code>Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
  
  Eshell V8.2  (abort with ^G)
  </code></pre>
  
  <p>What happened?</p>
  
  <p>EDIT:</p>
  
  <p>s:s is from my shortcut module</p>
  
  <pre><code>-module(s).
  -export([s/2]).
  % Shortcuts.
  
  % Send
  s(Pid, Message) -&gt;
    gen_server:call(Pid, Message).
  </code></pre>
  
  <p>The update message is sent on a timer in the Room, which tries to send update to each of the Tables.</p>
  
  <p>EDIT:</p>
  
  <p>I have changed ZERO code. Here's what happens when I run now.. is this because I already have the *.beam files?</p>
  
  <pre><code>=ERROR REPORT==== 29-Jan-2017::17:50:19 ===
  Error in process &lt;0.200.0&gt; with exit value:
  {undef,[{s,s,[&lt;0.59.0&gt;,update],[]}]}
  
  BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
         (v)ersion (k)ill (D)b-tables (d)istribution
  ^C~/tunnel:.ls
  actions.beam    clock.beam  hall.beam   s.erl       table.erl
  actions.erl clock.erl   hall.erl    seats.beam  timer.erl
  board.beam  game.beam   room.beam   seats.erl
  board.erl   game.erl    room.erl    table.beam
  ~/tunnel:.erl
  Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
  
  Eshell V8.2  (abort with ^G)
  1&gt; c(board).
  {ok,board}
  2&gt; c(all).
  all.erl: no such file or directory
  error
  3&gt; c().
  ** exception error: undefined shell command c/0
  4&gt; c(room).
  {ok,room}
  5&gt; c(s).
  {ok,s}
  6&gt; room:go().
  {ok,&lt;0.96.0&gt;}
  7&gt;
  BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
         (v)ersion (k)ill (D)b-tables (d)istribution
  ^C~/tunnel:.erl
  Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
  
  Eshell V8.2  (abort with ^G)
  1&gt; c(room).
  {ok,room}
  2&gt; room:go().
  {ok,&lt;0.72.0&gt;}
  3&gt; room:test().
    All 4 tests passed.
  ok
  4&gt;
  BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
         (v)ersion (k)ill (D)b-tables (d)istribution
  ^C~/tunnel:.
  ~/tunnel:.erl
  Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
  
  Eshell V8.2  (abort with ^G)
  1&gt; c(room).
  {ok,room}
  2&gt; room:go().
  {ok,&lt;0.72.0&gt;}
  3&gt; room:test().
    All 4 tests passed.
  ok
  4&gt;
  </code></pre>