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

Revert usage of HTTPClient.shared #193

Merged
merged 6 commits into from
May 24, 2024
Merged

Conversation

MahdiBM
Copy link
Collaborator

@MahdiBM MahdiBM commented May 19, 2024

Revert commits related to using HTTPClient.shared.
I don't think using the shared HTTPClient is necessary for Penny. It only moves Penny out of the control of the HTTPClient.

@MahdiBM MahdiBM requested review from 0xTim and gwynne as code owners May 19, 2024 17:13
Sources/Penny/Penny.swift Outdated Show resolved Hide resolved
@MahdiBM MahdiBM requested a review from 0xTim May 21, 2024 19:31
Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

A few comments but nothing blocking

Sources/Penny/Penny.swift Outdated Show resolved Hide resolved
@@ -49,7 +49,7 @@ actor DefaultAutoFaqsService: AutoFaqsService {
}
}

let httpClient: HTTPClient = .shared
var httpClient: HTTPClient!
Copy link
Member

Choose a reason for hiding this comment

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

Why is this an IUO

@@ -10,7 +10,7 @@ import NIOHTTP1

actor DefaultFaqsService: FaqsService {

let httpClient: HTTPClient = .shared
var httpClient: HTTPClient!
Copy link
Member

Choose a reason for hiding this comment

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

IUO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a reason although i don't remember it off-hand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are likely initialized first, then populated with the http client.

Tests/PennyTests/Tests/LeafRenderTests.swift Outdated Show resolved Hide resolved
@MahdiBM MahdiBM enabled auto-merge (squash) May 24, 2024 11:10
@MahdiBM MahdiBM merged commit 54c7c3c into main May 24, 2024
7 of 9 checks passed
@MahdiBM MahdiBM deleted the mmbm-revert-http-client-shared branch May 24, 2024 11:18
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.

None yet

2 participants