Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apple/swift-async-dns-resolver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.3.1
Choose a base ref
...
head repository: apple/swift-async-dns-resolver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.4.0
Choose a head ref
  • 2 commits
  • 11 files changed
  • 1 contributor

Commits on Mar 5, 2024

  1. Don't throw on empty responses (#28)

    Motivation:
    
    The AsyncDNSResolver currently throws an error when there are no records
    associated with a name. However, most query responses are arrays or
    contain arrays. As such it's unclear to callers whether they should be
    catching an error of a particular type or checking for the presence of
    values some combination of the two.
    
    Modifications:
    
    - Modify the `DNSResolver` API to return `nil` where only a single value
      is expected (e.g. CNAME).
    - Update documentation on `DNSResolver` to clarify the expected return
      values when no values are resolved.
    - Update the c-ares backend to check for no data when parsing and return
      empty responses
    - Update the DNSSD backend to pass in `nil` data to the parser when the
      status is timeout
    - Remove the `noData` error code as it shouldn't be reachable anymore
    
    Result:
    
    Queries with no response either return empty or nil
    glbrntt authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    6e94db5 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Simplify AsyncDNSResolver.Error (#27)

    Motivation:
    
    The 'AsyncDNSResolver.Error' is closely modelled on the c-ares error
    codes and doesn't fit well with the DNSSD error codes. Further, the
    DNSSD backed doesn't map its error cdes back into an
    'AsyncDNSResolver.Error' so all DNSSD errors become 'other' errors.
    
    Modifications:
    
    - Reduce the number of error codes in 'AsyncDNSResolver.Error' to a few
      high level error codes and a catch-all 'internal' error code.
    - Update mappings from c-ares error codes, add mappings from dnssd error
      codes.
    - Add a 'source' property, which can be 'any Error', allowing users to
      get fine grained error information if necessary.
    
    Result:
    
    Error codes are more consistent across implementations.
    glbrntt authored Mar 6, 2024
    Configuration menu
    Copy the full SHA
    08c07ff View commit details
    Browse the repository at this point in the history
Loading