Comments (3)
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.
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.
@Jonathas-Conceicao regarding point 1, I think (a) is the best.
from actix-net.
Related Issues (20)
- Make actix-rt (and actix itself) work with tokio console HOT 1
- error: linking with `cc` failed: exit status: 1 (libactix_server: error adding symbols: bad value) HOT 1
- `actix_rt::main` is not compatible with tokio `block_on` HOT 1
- Make System::with_tokio_rt take a `FnOnce`
- actix-codec: Support Half streams HOT 2
- local-waker sub-crate does not include license files HOT 1
- Run server again after stopping it by ServerHandle::stop() HOT 2
- Feature Request: add new feature `rustls-native-certs` HOT 4
- impl Transform for Option HOT 1
- how to close connection immediately? HOT 1
- Support Tokio 0.2.x HOT 1
- Syn 2 upgrade
- publish actix-codec 0.5.1 to creates.io HOT 1
- actix-tls 3.0.4 was never released HOT 4
- SECURITY: please cut new release (actix-tls) HOT 4
- Crates.io page is outdated. HOT 2
- Please update the ring crate to 17.x HOT 1
- actix-tls 3.1.1 introduces rustls dependency forcibly HOT 3
- actix-macros don't support build on alpine(aarch64) HOT 1
- Release new version of actix codec HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actix-net.