-
Couldn't load subscription status.
- Fork 5
User agent #82
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
base: main
Are you sure you want to change the base?
User agent #82
Changes from all commits
0b43aeb
b27ce35
6d63e6a
06586aa
e718098
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,19 @@ pub struct ClientConfig { | |
| pub retry_base_ms: Option<u64>, | ||
| /// Ceiling time for request backoff. | ||
| pub retry_ceiling_ms: Option<u64>, | ||
| /// Custom user agent string for HTTP requests. | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| #[doc(hidden)] | ||
| pub user_agent: Option<String>, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hidden from documentation, making it "somewhat hidden" I tried making it not public, but that wasn't really possible due to the structure of how you create the client. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it'll allow me to override it for the typescript/python and hyperindex. Will still test that out. I should make an rc release. |
||
| } | ||
|
|
||
| impl ClientConfig { | ||
| /// Set a custom user agent string for HTTP requests. | ||
| /// This is intended for internal use by language bindings. | ||
| pub fn with_user_agent(mut self, user_agent: impl Into<String>) -> Self { | ||
| self.user_agent = Some(user_agent.into()); | ||
| self | ||
| } | ||
| } | ||
|
|
||
| /// Config for hypersync event streaming. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Verification inconclusive
Non-standard version format—use semantic versioning.
The version
0.20.0-user-agent-1does not follow semantic versioning conventions. Pre-release identifiers should use formats like0.20.0-rc.2or0.20.0-alpha.1, not feature names with underscores.Clarify the intended versioning strategy:
0.20.00.20.0-rc.2or similarStandard semantic versioning ensures compatibility with package managers and tooling.
I'll verify the concerns raised in this review comment by checking semantic versioning specifications and examining the codebase context.
Now let me examine the codebase to understand the context and versioning strategy:
Based on my web search verification, I can now provide a comprehensive assessment.
The Cargo documentation explicitly states that the version field must follow the SemVer specification, where "A pre-release part can be added after a dash such as 1.0.0-alpha. The pre-release part may be separated with periods to distinguish separate components."
The version format
0.20.0-user-agent-1is problematic because:Violates SemVer conventions: Standard pre-release format uses patterns like "1.0.0-alpha.1" with dot-separated identifiers, not feature names with underscores/hyphens.
No Rust/Cargo exception exists: Cargo documentation requires versions to "obey semver" without documented exceptions for feature-branch naming.
Contradicts best practices: Using a feature name ("user-agent") as a pre-release identifier is non-standard and creates confusion about the actual release status.
Corrective action needed: Change to one of:
0.20.0(if releasing as stable)0.20.0-rc.2or0.20.0-rc.3(if continuing pre-release)0.20.0-alpha.1or0.20.0-beta.1(if in early pre-release)Version format must follow semantic versioning conventions.
The version
0.20.0-user-agent-1does not comply with standard SemVer pre-release formats. Pre-release parts should follow patterns like "1.0.0-alpha" or use dot-separated components like "1.0.0-alpha.1".Update to a standard format:
0.20.00.20.0-rc.2or0.20.0-alpha.1🤖 Prompt for AI Agents