On 4/13/2011 2:35 PM, Ryan Davis wrote:
When working on a larger lisp code base, one with 10+ files in one package, I begin to get nervous about accidental name conflicts, and was wondering how other people deal with this.

Here's the scenario I'm worried about:

    * dsl.lisp, written by a coworker two years ago, has a number of
      small functions that are helpers for the main #'WRITE-DSL-REPORT
      function; one of these helpers is #'GET-WAN-IPS
    * nagios-config.lisp, written by me today, has a number of small
      functions that are helpers for the main #'WRITE-NAGIOS-CONFIG
      function; one of these helpers is #'GET-WAN-IPS
    * I miss the compiler warning about redefining #'GET-WAN-IPS
    * I test my code, it works in my REPL so I commit and call it a day
    * Code eventually gets pushed to production and #'WRITE-DSL-REPORT
      is broken

It doesn't happen very often (and testing procedures usually catch stuff before it goes to production), but it seems like there should be a nicer way to deal with helper functions that you want to develop/test from the REPL, but don't need to be used outside the current file.

The compiler warning should not have been missed. We have a "no warnings" policy so warnings stand out, and I use the option in the AllegroCL IDE that has it pop up a dialog on warnings (so I /really/ cannot miss them).

I suspect also that there may be a problem with the conclusion that the code has been tested and works because it works in a REPL.

Absent those two issues, there is no longer a problem. :)

kt

_______________________________________________
pro mailing list
[email protected]
http://common-lisp.net/cgi-bin/mailman/listinfo/pro

Reply via email to