Skip to content
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

Playing with naming: rename InstantiableRequestContext to InitializableFromSource and set Source as primary type #475

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

adam-fowler
Copy link
Member

@adam-fowler adam-fowler commented Jun 15, 2024

So Context: InstantiableRequestContext where Context.Source == Type becomes Context: InitializedFrom<Type>

Also

  • renamed ServerRequestContextSource to ApplicationRequestContextSource
  • moved some code about

@adam-fowler adam-fowler requested a review from Joannis as a code owner June 15, 2024 17:06
@Joannis
Copy link
Member

Joannis commented Jun 15, 2024

I'd like this to become a bit more of a discussion before we make a bunch of PRs to change names.

@adam-fowler
Copy link
Member Author

The PR was meant to be a discussion. We can do this in another forum if you want. I'm not 100% on the name. I think the primary associated type works quite well.

@Joannis Joannis marked this pull request as draft June 15, 2024 18:30
@adam-fowler adam-fowler changed the title Playing with naming: rename InstantiableRequestContext to InitializedFrom and set Source as primary type Playing with naming: rename InstantiableRequestContext to InitializableFromSource and set Source as primary type Jun 17, 2024
@adam-fowler adam-fowler marked this pull request as ready for review June 17, 2024 08:24
//===----------------------------------------------------------------------===//

/// A type that can be initialized from another type
public protocol InitializableFromSource<Source>: Sendable {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filename needs to change to InitializableFromSource.swift

@adam-fowler adam-fowler merged commit 1d10ee0 into main Jun 17, 2024
4 of 5 checks passed
@adam-fowler adam-fowler deleted the initialize-from branch June 17, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants