Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tracking unknown fields. #129

Merged
merged 7 commits into from
Sep 1, 2017
Merged

Commits on Aug 30, 2017

  1. Add support for tracking unknown fields.

    - Every message has a new field containing a list of unknown fields:
      ```unknownFields :: Message msg => Lens' msg [TaggedValue]```
    - Unknown fields are preserved by `decodeMessage`, `encodeMessage`,
      and `showMessage`
    - Unknown fields still cause an error for `readMessage`.
    
    A few TODOs:
    - For now, unknown groups are printed sub-optimally by `showMessage`: the
      start/end group tags (and everything in between) all get displayed as
      individual fields, rather than being organized into a sub-struct.
    - The `discardUnknownFields` function isn't recursive, unlike in other
      languages.
    - The Ord instance doesn't try to do anything special, just treating
      the unknown fields as a list of values.  If it really matters then
      `discardUnknownFields` can help resolve the ambiguity.
    judah committed Aug 30, 2017
    Configuration menu
    Copy the full SHA
    137e2aa View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2017

  1. remove import

    judah committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    ebec9da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f27f853 View commit details
    Browse the repository at this point in the history
  3. Add an NFData instance for TaggedValue.

    It's needed by the benchmarks.
    judah committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    abeb5d7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c239c17 View commit details
    Browse the repository at this point in the history
  5. User over'

    judah committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    dcca203 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2017

  1. Fix warnings.

    judah committed Sep 1, 2017
    Configuration menu
    Copy the full SHA
    ae867e1 View commit details
    Browse the repository at this point in the history