Remove time.Deadline 0 value semantics.

[See below about a bugfix attached to this CL]

As a recap, time.Deadline is a native type representing deadlines
using an absolute time, while time.WireDeadline is a wire type
representing deadlines using a relative duration from now.

In both old and new code, the native time.Deadline indicates "no
deadline" using time.Time.IsZero().

The old code set WireDeadline.NoDeadline to indicate the "no
deadline" case.  This is bad, since it means the zero-value
semantics are different between the native and wire types, which
is annoying for VDL/VOM.

The new code removes the WireDeadline.NoDeadline field, and
instead uses WireDeadline.FromNow=0 as a sentry to indicate "no
deadline".  This leaves open a tiny (but non-zero) possibility
that new binaries will interpret old binaries incorrectly.  But
that seems fine for now; even if it happens, it shouldn't have a
big impact.

[BUGFIX]
Annoyingly this exposed a bug in the old generated decoders.  We
need to return the special-case vdl.ErrFieldNoExist when
encountering non-existent fields, in order for backwards
compatibility to work for unknown struct fields.  But we
weren't.  This CL also fixes that bug.

MultiPart: 4/4
Change-Id: I4f7023809a6a55f0ca55efae78892bd9d65ac2c4
1 file changed
tree: a2bed78bae7847a6eb7cb712a387bf8f142163d7
  1. go/
  2. .gitignore
  3. AUTHORS
  4. CONTRIBUTING.md
  5. CONTRIBUTORS
  6. LICENSE
  7. PATENTS
  8. VERSION