Giter Club home page Giter Club logo

Comments (3)

Jonathas-Conceicao avatar Jonathas-Conceicao commented on May 18, 2024

I have a WIP migration ready on a branch of mine but there are a couple of things to be fixed and it would be nice to have someone from the @actix/contributors or the community in geral to opt in on it.

I would't mind creating a PR in case anyone thinks it would be easier to make the discussion there.

1. Handle Result from AsyncResolver::new

The first point is that the new AsyncResolver provided by trust-dns-resolver returns a result when trying to build with a given config. If this fails should we (a) propagate the the error to the caller? (b) Start the resolver with the default config? Or should we (c) panic with a proper message, i.e., use expect?

Since this will already introduce a breaking change I believe that (a) is the best way to handle this.

2. Service::call for Resolver<T>

As creating a new AsyncResolver will now be an async function, the Service::call implementation for Resolver<T> becomes more tricky. That's because it involves updating the internal state of the Resolver if the internal AsyncResolver as not beeing set yet, but as this future is returned, handling the lifetime to the Resolver itself becomes tricky.

What I currently have is that I don't update the internal state of the Resolver on the Service::call, so if it's called without a AsyncResolver already set, it will always create a new one. This seams to work but I'm not sure if it's ideal.

from actix-net.

ignatenkobrain avatar ignatenkobrain commented on May 18, 2024

This is necessary to update actix stack in Fedora... I believe this was already done for Actix itself, so this probably should not be very complicated.

from actix-net.

ignatenkobrain avatar ignatenkobrain commented on May 18, 2024

@Jonathas-Conceicao regarding point 1, I think (a) is the best.

from actix-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.