title: Can I retire a required protobuf field?
body: <p>I have a client-server application where the server transmits serialized objects in protobuf format to a client, and I would like to retire a <code>required</code> field. Unfortunately I can't change both client and server at the same time to use the new <code>.proto</code> definition.</p>
  
  <p>If I change a <code>required</code> field to be <code>optional</code>, but only for code that <em>serializes</em> messages (i.e. <em>deserializing</em> code has not been rebuilt and still thinks it's a <code>required</code> field), can I continue to publish messages that can be deserialized <strong>as long as I populate a value for the now-<code>optional</code> field?</strong></p>
  
  <p>(It appears to be fine to do so, at least for a few trivial cases I experimented with (only using Java), but I'm interested if it's a generally sensible approach, and whether there are any edge cases etc I should worry about).</p>
  
  <p><strong>Motivation</strong>: My goal is to retire a <code>required</code> field in a client-server application where the server publishes messages that are deserialized by the client. My intended approach is:</p>
  
  <ol>
  <li>Change <code>required</code> field to <code>optional</code> on the trunk.</li>
  <li>If it's necessary to deploy new server code (for unrelated features/fixes), <em>ensure that the optional field continues to be populated in the message</em>.</li>
  <li>Gradually deploy updated code for all clients (this will take time as it requires involvement of other teams with their own release schedules)</li>
  <li>Confirm that all clients have been updated.</li>
  <li>Begin to retire (i.e. not populate) the optional field.</li>
  </ol>