[swift-server-dev] HTTP API: prototype review process - prototype now live in "develop"

Carl Brown carl.brown.swift at linuxswift.com
Thu Jun 1 09:56:43 CDT 2017


> On Jun 1, 2017, at 3:35 AM, Alex Blewitt <alblue at apple.com> wrote:
> 
>> On 31 May 2017, at 23:27, Carl Brown via swift-server-dev <swift-server-dev at swift.org> wrote:
>> 
>> That's normal (or at least expected). 
>> 
>> To make the tests run faster, I force-close the sockets at the end of each of the XCTests instead of waiting for a graceful cleanup. The Socket library sees that as an error (which it would be, if it happened under normal circumstances).
> 
> Where does the error printing happen? If it's in Swift, can we suppress it so that ti doesn't confuse people who are running the tests in future?
> 
> Alex


It's in Swift, but it's several layers of encapsulation removed from the tests, and in many different places.

I started an implementation where there was a boolean flag that indicated that the socket had been forced-closed and that errors needed to be suppressed, and that flag was propagated down the call stack, but it turned out to make the code a lot harder to read.  

For this stage of the prototype, we thought that shorter and cleaner we could get the code, the easier it would be to discuss and share with the community.

If the consensus is that the community thinks the trade off is worth it, it's not very hard to put in, but it complicates all the development going forward.

What does everyone think?

-Carl


More information about the swift-server-dev mailing list