Skip to content

docs: fix Configuration.Builder examples to include AutoEnvAttributes parameter#236

Merged
kinyoklion merged 2 commits intomainfrom
devin/1774051833-fix-auto-env-attrs-doc-examples
Mar 24, 2026
Merged

docs: fix Configuration.Builder examples to include AutoEnvAttributes parameter#236
kinyoklion merged 2 commits intomainfrom
devin/1774051833-fix-auto-env-attrs-doc-examples

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

@kinyoklion kinyoklion commented Mar 21, 2026

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

No test changes needed — this PR only modifies XML doc comments. Compilation of the updated examples was verified using a temporary test project.

Related issues

N/A — identified during a documentation audit of client-side SDK examples.

Describe the solution you've provided

All Configuration.Builder code examples in the client SDK's XML doc comments were using the outdated single-parameter signature (Configuration.Builder(key)), which no longer compiles. The current builder requires an AutoEnvAttributes parameter.

This PR updates every affected doc example across 12 source files in pkgs/sdk/client/src/ to use the fully-qualified form ConfigurationBuilder.AutoEnvAttributes.Enabled, since AutoEnvAttributes is a nested enum inside ConfigurationBuilder and the short form does not resolve without a using static directive.

Describe alternatives you've considered

  • Using the short form AutoEnvAttributes.Enabled — does not compile without a using static import, which would be misleading in doc examples.

Additional context

Key items for review:

  • Completeness — please verify no outdated Configuration.Builder(key) examples were missed. A grep for the single-argument pattern against pkgs/sdk/client/src/ returns zero results after this change.
  • Note that the Components.Plugins() example already had the correct two-argument signature and was intentionally left unchanged.
  • These are purely doc comment changes (no functional code modified).

Human review checklist

  • Verify ConfigurationBuilder.AutoEnvAttributes.Enabled is the preferred form for doc examples (vs. adding a using static import to examples)
  • Confirm no doc examples were missed — grep -r 'Configuration.Builder(sdkKey)' pkgs/sdk/client/src/ and grep -r 'Configuration.Builder(mobileKey)' pkgs/sdk/client/src/ should return zero non-qualified results
  • Note: some pre-existing issues exist in doc examples (e.g. references to AllAttributesPrivate, StartWaitTime on the builder) — those are out of scope for this PR

Updates since last revision

Changed all examples from the short form AutoEnvAttributes.Enabled to the fully-qualified ConfigurationBuilder.AutoEnvAttributes.Enabled, per reviewer feedback. Verified compilation with a temporary test project that exercises all updated patterns.

Link to Devin session: https://app.devin.ai/sessions/c465b9ad05c7492880221b219b299142
Requested by: @kinyoklion

… parameter

Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@kinyoklion kinyoklion marked this pull request as ready for review March 21, 2026 00:15
@kinyoklion kinyoklion requested a review from a team as a code owner March 21, 2026 00:15
@kinyoklion kinyoklion added the devin-pr PR was created by Devin AI label Mar 21, 2026
/// <example>
/// <code>
/// var config = Configuration.Builder(sdkKey)
/// var config = Configuration.Builder(sdkKey, AutoEnvAttributes.Enabled)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does this need to be ConfigurationBuilder.AutoEnvAttributes.Enabled?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch — you're right, AutoEnvAttributes is a nested enum inside ConfigurationBuilder, so the short form doesn't compile. I've pushed a fix using the fully-qualified ConfigurationBuilder.AutoEnvAttributes.Enabled in all doc examples. Verified it compiles with a temporary test project.

…led in examples

Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
@kinyoklion kinyoklion merged commit e462bcf into main Mar 24, 2026
14 checks passed
@kinyoklion kinyoklion deleted the devin/1774051833-fix-auto-env-attrs-doc-examples branch March 24, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devin-pr PR was created by Devin AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants