Watch out for plural vs. singular
Nate Finch
nate.finch at canonical.com
Thu Mar 19 15:48:35 UTC 2015
Wayne and I (and Horacio for some of the time) wasted a few days trying to
figure out a problem with the watcher we'd created. Turns out, the problem
was a missing 's':
https://github.com/natefinch/juju/commit/12ad8d64f26aca5541bbd0f0c10cd8b45bcbcc75
Thanks to Dimiter and John Weldon for catching it last night.
The reason the code still compiled is because all the facade caller (rpc)
stuff uses empty interfaces and reflection to do
serialization/deserialization. This is, at some level, unavoidable.
However, it's sort of our own fault, too, for naming two things so
similarly in code that we *know* is not type safe.
Please try to avoid making two types with very similar names if they're
commonly used for serialization, especially if they're long names that only
differ at the end. It makes it way too easy for a typo to slip in and
cause hard to find bugs.
-Nate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20150319/dd2b42a6/attachment.html>
More information about the Juju-dev
mailing list