Skip to content

Spelling #2250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/GRPCCodeGen/CodeGenerationRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public struct MethodName: Hashable {

/// The name as used as a property.
///
/// This value typically starts with an lowercase character, for example "get".
/// This value typically starts with a lowercase character, for example "get".
public var functionName: String

public init(identifyingName: String, typeName: String, functionName: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class StringCodeWriter {
internal let indentation: Int

/// Whether the next call to `writeLine` will continue writing to the last
/// stored line. Otherwise a new line is appended.
/// stored line. Otherwise, a new line is appended.
private var nextWriteAppendsToLastLine: Bool = false

/// Creates a new empty writer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ struct ServerCodeTranslator {
/// This protocol is higher level than ``StreamingServiceProtocol`` but lower level than
/// the ``SimpleServiceProtocol``, it provides access to request and response metadata and
/// trailing response metadata. If you don't need these then consider using
/// the ``SimpleServiceProtocol``. If you need fine grained control over your RPCs then
/// the ``SimpleServiceProtocol``. If you need fine-grained control over your RPCs then
/// use ``StreamingServiceProtocol``.
"""
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Call/Client/CallOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct CallOptions: Sendable {
/// Whether RPCs for this method should wait until the connection is ready.
///
/// If `false` the RPC will abort immediately if there is a transient failure connecting to
/// the server. Otherwise gRPC will attempt to connect until the deadline is exceeded.
/// the server. Otherwise, gRPC will attempt to connect until the deadline is exceeded.
public var waitForReady: Bool?

/// The maximum allowed payload size in bytes for an individual request message.
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Call/Client/ClientResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public struct ClientResponse<Message: Sendable>: Sendable {
///
/// A stream response captures every part of the response stream over time and distinguishes
/// accepted and rejected requests via the ``accepted`` property. An "accepted" request is one
/// where the the server responds with initial metadata and attempts to process the request. A
/// where the server responds with initial metadata and attempts to process the request. A
/// "rejected" request is one where the server responds with a status as the first and only
/// response part and doesn't process the request body.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ extension ClientRPCExecutor.RetryExecutor {
// subscriber and maximises the chances that 'isKnownSafeForNextSubscriber' will
// return true.
//
// Note: this must only be called if we should retry, otherwise we may cancel a
// Note: this must only be called if we should retry; otherwise, we may cancel a
// subscriber for an accepted request.
retryStream.invalidateAllSubscriptions()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extension ClientRPCExecutor {
/// - deserializer: A deserializer to convert bytes to output messages.
/// - interceptors: An array of interceptors which the request and response pass through. The
/// interceptors will be called in the order of the array.
/// - stream: The stream to excecute the RPC on.
/// - stream: The stream to execute the RPC on.
/// - Returns: The deserialized response.
@inlinable // would be private
static func _execute<Input: Sendable, Output: Sendable, Bytes: GRPCContiguousBytes>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extension StreamingClientResponse {
/// Creates a streaming response from the given status and metadata.
///
/// If the ``Status`` has code ``Status/Code-swift.struct/ok`` then an accepted stream is created
/// containing only the provided metadata. Otherwise a failed response is returned with an error
/// containing only the provided metadata. Otherwise, a failed response is returned with an error
/// created from the status and metadata.
///
/// - Parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal enum ClientStreamExecutor {
/// - attempt: The attempt number for the RPC that will be executed.
/// - serializer: A request serializer.
/// - deserializer: A response deserializer.
/// - stream: The stream to excecute the RPC on.
/// - stream: The stream to execute the RPC on.
/// - Returns: A streamed response.
@inlinable
static func execute<Input: Sendable, Output: Sendable, Bytes: GRPCContiguousBytes>(
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Configuration/MethodConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public struct MethodConfig: Hashable, Sendable {
/// Whether RPCs for this method should wait until the connection is ready.
///
/// If `false` the RPC will abort immediately if there is a transient failure connecting to
/// the server. Otherwise gRPC will attempt to connect until the deadline is exceeded.
/// the server. Otherwise, gRPC will attempt to connect until the deadline is exceeded.
public var waitForReady: Bool?

/// The default timeout for the RPC.
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Configuration/ServiceConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public struct ServiceConfig: Hashable, Sendable {
///
/// - Parameters:
/// - methodConfig: Per-method configuration.
/// - loadBalancingConfig: Load balancing policies. Clients use the the first supported
/// - loadBalancingConfig: Load balancing policies. Clients use the first supported
/// policy when iterating the list in order.
/// - retryThrottling: Policy for throttling retries.
public init(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ let server = GRPCServer(
transport: .http2NIOPosix(
// Configure the host and port to listen on.
address: .ipv4(host: "127.0.0.1", port: 1234),
// Configure TLS here, if your're using it.
// Configure TLS here, if you're using it.
transportSecurity: .plaintext,
config: .defaults { config in
// Change any of the default config in here.
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Documentation.docc/Development/Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ protocol ServiceName.ClientProtocol {
```

Each method takes a request appropriate for its RPC type, a serializer, a
deserializer, a set of options and a handler for processing the response. The
deserializer, a set of options, and a handler for processing the response. The
function doesn't return until the response handler has returned and all
resources associated with the RPC have been cleaned up.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

@Steps {
@Step {
Open `HelloWorld.proto` in to see how the service is defined.
Open `HelloWorld.proto` to see how the service is defined.

@Code(name: "HelloWorld.proto", file: "hello-world-sec03-step01.proto")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
following code in.

`@main` indicates that the type contains the entry point to the program. In this case,
because `RouteGuide` conforms to `AsyncParseableCommand`, the entry point to our program
because `RouteGuide` conforms to `AsyncParsableCommand`, the entry point to our program
is the `run()` method. The `@Flag` annotation marks `server` as a flag to the argument
parser so that you can specify `--server` when running the program.

Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Internal/Base64.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ enum Base64 {
case (true, 1):
throw DecodingError.invalidLength
default:
// everythin alright so far
// everything alright so far
break
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Internal/Metadata+GRPC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ extension Metadata {
let attoseconds = Int64(remainingMilliseconds) * 1_000_000_000_000_000
self = .retryAfter(Duration(secondsComponent: seconds, attosecondsComponent: attoseconds))
} else {
// Negative or not parseable means stop trying.
// Negative or not parsable means stop trying.
// Source: https://github.com/grpc/proposal/blob/0e1807a6e30a1a915c0dcadc873bca92b9fa9720/A6-client-retries.md
self = .stopRetrying
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Internal/String+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extension UInt8 {
}

extension String.UTF8View {
/// Compares two UTF8 strings as case insensitive ASCII bytes.
/// Compares two UTF8 strings as case-insensitive ASCII bytes.
///
/// - Parameter bytes: The string constant in the form of a collection of `UInt8`
/// - Returns: Whether the collection contains **EXACTLY** this array or no, but by ignoring case.
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Metadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public struct Metadata: Sendable, Hashable {
/// - Parameters:
/// - key: The key for the key-value pair.
/// - value: The value to be associated to the given key. If it's a binary value, then the associated
/// key must end in "-bin", otherwise, this method will produce an assertion failure.
/// key must end in "-bin"; otherwise, this method will produce an assertion failure.
init(key: String, value: Value) {
if case .binary = value {
assert(key.hasSuffix("-bin"), "Keys for binary values must end in -bin")
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/MethodDescriptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct MethodDescriptor: Sendable, Hashable {
/// The fully qualified method name in the format "package.service/method".
///
/// For example, the fully qualified name of the "SayHello" method of the "Greeter" service in
/// "helloworld" package is "helloworld.Greeter/SayHelllo".
/// "helloworld" package is "helloworld.Greeter/SayHello".
public var fullyQualifiedMethod: String {
"\(self.service)/\(self.method)"
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/RPCError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ extension RPCError.Code {
/// The caller does not have permission to execute the specified operation.
/// ``permissionDenied`` must not be used for rejections caused by exhausting
/// some resource (use ``resourceExhausted`` instead for those errors).
/// ``permissionDenied`` must not be used if the caller can not be identified
/// ``permissionDenied`` must not be used if the caller cannot be identified
/// (use ``unauthenticated`` instead for those errors).
public static let permissionDenied = Self(code: .permissionDenied)

Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Status.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ extension Status.Code {
/// The caller does not have permission to execute the specified operation.
/// ``permissionDenied`` must not be used for rejections caused by exhausting
/// some resource (use ``resourceExhausted`` instead for those errors).
/// ``permissionDenied`` must not be used if the caller can not be identified
/// ``permissionDenied`` must not be used if the caller cannot be identified
/// (use ``unauthenticated`` instead for those errors).
public static let permissionDenied = Self(code: .permissionDenied)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ extension _BroadcastSequenceStateMachine {
@usableFromInline
var nextElementID: _BroadcastSequenceStateMachine<Element>.Elements.ID

/// A continuation which which will be resumed when the next element becomes available.
/// A continuation which will be resumed when the next element becomes available.
@usableFromInline
var continuation: ConsumerContinuation?

Expand All @@ -1592,7 +1592,7 @@ extension _BroadcastSequenceStateMachine {

/// Returns and sets the continuation to `nil` if one exists.
///
/// The next element ID is advanced if a contination exists.
/// The next element ID is advanced if a continuation exists.
///
/// - Returns: The continuation, if one existed.
@inlinable
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Transport/ClientTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public protocol ClientTransport<Bytes>: Sendable {
/// running ``connect()``.
func beginGracefulShutdown()

/// Opens a stream using the transport, and uses it as input into a user-provided closure alongisde the given context.
/// Opens a stream using the transport, and uses it as input into a user-provided closure alongside the given context.
///
/// - Important: The opened stream is closed after the closure is finished.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,10 @@ final class Test_TextBasedRenderer: XCTestCase {

func testProtocol() throws {
try _test(
.init(name: "Protocoly"),
.init(name: "Protocolly"),
renderedBy: { $0.renderProtocol(_:) },
rendersAs: #"""
protocol Protocoly {}
protocol Protocolly {}
"""#
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ final class IDLToStructuredSwiftTranslatorSnippetBasedTests: XCTestCase {
/// This protocol is higher level than ``StreamingServiceProtocol`` but lower level than
/// the ``SimpleServiceProtocol``, it provides access to request and response metadata and
/// trailing response metadata. If you don't need these then consider using
/// the ``SimpleServiceProtocol``. If you need fine grained control over your RPCs then
/// the ``SimpleServiceProtocol``. If you need fine-grained control over your RPCs then
/// use ``StreamingServiceProtocol``.
///
/// > Source IDL Documentation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ final class ServerCodeTranslatorSnippetBasedTests {
/// This protocol is higher level than ``StreamingServiceProtocol`` but lower level than
/// the ``SimpleServiceProtocol``, it provides access to request and response metadata and
/// trailing response metadata. If you don't need these then consider using
/// the ``SimpleServiceProtocol``. If you need fine grained control over your RPCs then
/// the ``SimpleServiceProtocol``. If you need fine-grained control over your RPCs then
/// use ``StreamingServiceProtocol``.
///
/// > Source IDL Documentation:
Expand Down
2 changes: 1 addition & 1 deletion Tests/GRPCCoreTests/Call/Client/ClientResponseTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ final class ClientResponseTests: XCTestCase {
func testStreamToSingleConversionForInvalidStream() async throws {
let bodies: [[StreamingClientResponse<String>.Contents.BodyPart]] = [
[], // Empty stream
[.trailingMetadata([:]), .trailingMetadata([:])], // Multiple metadatas
[.trailingMetadata([:]), .trailingMetadata([:])], // Multiple metadata
[.trailingMetadata([:]), .message("")], // Metadata then message
]

Expand Down
2 changes: 1 addition & 1 deletion Tests/GRPCCoreTests/Test Utilities/Coding+JSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct JSONDeserializer<Message: Codable>: MessageDeserializer {
let data = serializedMessageBytes.withUnsafeBytes { Data($0) }
return try jsonDecoder.decode(Message.self, from: data)
} catch {
throw RPCError(code: .internalError, message: "Can't deserialze message from JSON. \(error)")
throw RPCError(code: .internalError, message: "Can't deserialize message from JSON. \(error)")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct JSONDeserializer<Message: Codable>: MessageDeserializer {
let data = serializedMessageBytes.withUnsafeBytes { Data($0) }
return try jsonDecoder.decode(Message.self, from: data)
} catch {
throw RPCError(code: .internalError, message: "Can't deserialze message from JSON. \(error)")
throw RPCError(code: .internalError, message: "Can't deserialize message from JSON. \(error)")
}
}
}
2 changes: 1 addition & 1 deletion dev/protos/fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git clone --depth 1 https://github.com/googleapis/googleapis.git "$checkouts/goo
# Remove the old protos.
rm -rf "$upstream"

# Create new directories to poulate. These are based on proto package name
# Create new directories to populate. These are based on proto package name
# rather than source repository name.
mkdir -p "$upstream/google"
mkdir -p "$upstream/grpc/core"
Expand Down