swift-server / async-http-client

HTTP client library built on SwiftNIO
https://swiftpackageindex.com/swift-server/async-http-client/main/documentation/asynchttpclient
Apache License 2.0
917 stars 118 forks source link

Redundant Naming #18

Closed calebkleveter closed 5 years ago

calebkleveter commented 5 years ago

The name for this repo is rather redundant. Because the org is called swift-server, it can be safely assumed that Swift is the language that the projects will be built in. I suggest that the swift- prefix gets removed from the repo name. This makes the names more concise.

There are a couple of reasons I can think of that people might have against this, and why I think they aren't issues:

weissi commented 5 years ago

+1 from me.

Lukasa commented 5 years ago

-1 from me: the repo name affects the default directory name when cloning the repo, and in that context swift-server will not be present.

weissi commented 5 years ago

-1 from me: the repo name affects the default directory name when cloning the repo, and in that context swift-server will not be present.

Sure, but why do you need to know it's written in Swift? It's also not swift-kitura/swift-vapor, right? Tbh I don't even think we need the nio bit.

tanner0101 commented 5 years ago

+1 from me for dropping swift-*.


Here's an overview of the patterns being used currently. We should at least make sure that all packages have their package names matching their URLs since having a mismatch there could cause issues with SPM in the future. But it would be nice if we could standardize this so that it's obvious what to do and we can be consistent.


Both URL and package name are nio-*:

https://github.com/vapor/nio-postgres
https://github.com/vapor/nio-mysql
https://github.com/vapor/nio-sqlite
https://github.com/vapor/nio-websocket-client
https://github.com/mordil/nio-redis

URL prefixed with swift-nio-* but package is nio-*

https://github.com/kylebrowning/swift-nio-apns

URL and package name prefixed with swift-nio-*

https://github.com/apple/swift-nio-ssl
https://github.com/apple/swift-nio-http2
https://github.com/swift-server/swift-nio-http-client
weissi commented 5 years ago

@tanner0101 very good point. In SwiftPM, there are three identifiers that need to be unique across the whole dependency tree for any given application:

so we should always thing about them. So far the SSWG-approved packages are consistent:

weissi commented 5 years ago

CC @artemredkin / @tomerd / @ktoso / @yim-lee / @ianpartridge

artemredkin commented 5 years ago

I'm in favour of dropping swift-*, but only if it's consistent across other libraries. I don't mind having two swifts in my package URL at all, but would prefer for swift- to be dropped everywhere (if it's feasible).

yim-lee commented 5 years ago

I think it's good to know the underlying framework (i.e., SwiftNIO) by just looking at the repo name, so definitely prefer swift-server/swift-nio-http-client or swift-server/nio-http-client.

I don't mind having two swifts either because "swift-nio" seems more proper to me--similar to "John Smith" vs. "John", swift is like a surname.

tomerd commented 5 years ago

swift-server/swift-nio-http-client or swift-server/nio-http-client both sound good to me. we originally named this swift-nio-http-client to follow the pattern established with swift-nio, swift-log and swift-metrics. the swift prefix for these three stems from the fact they are in the apple org that contains other technologies as well, so we needed to be able to know that they are swift packages at a glance

ianpartridge commented 5 years ago

My preference would be swift- everywhere - I don't think it does any harm and it makes all my GitHub checkouts appear next to each other. But we may not be able to achieve that consistency given the divergent views here :-)

There's also the issue of the -client suffix. We have nio-websocket-client (cool to see that @tanner0101!) but nio-redis. I'd prefer the latter to be nio-redis-client (or swift-nio-redis-client) personally.

tomerd commented 5 years ago

in my experience explicit naming is typically better / more future proof

weissi commented 5 years ago

I wrote a forums post that is related to this. I believe we need to be careful with future clashes. Please let me know what you think: https://forums.swift.org/t/namespacing-of-packages-modules-especially-regarding-swiftnio/24726

artemredkin commented 5 years ago

Since project was renamed to async-http-client I think this issue is no longer relevant.