fix: enable Speakeasy fix flags to resolve forward-reference NameErrors#179
Conversation
Speakeasy generates classes in wrong order in source_google_analytics_data_api_schemas_custom_reports_array_int64value.py, causing NameError when importing SourceResponse and related models. The nameResolutionFeb2025 fix flag should address class ordering. Co-Authored-By: AJ Steers <aj@airbyte.io>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
There was a problem hiding this comment.
Pull request overview
Enables Speakeasy’s nameResolutionFeb2025 generation fix flag to address forward-reference ordering issues in generated Python models (e.g., NameError on import for SourceResponse), aligning with the repo’s generated-code workflow.
Changes:
- Turned on
generation.fixes.nameResolutionFeb2025ingen.yamlto improve name/ordering resolution in generated output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ward-reference errors Co-Authored-By: AJ Steers <aj@airbyte.io>
|
|
Generated Code Drift Detected The committed code does not match what the generation pipeline produces. To fix: Comment |
Summary
Fixes
NameError/PydanticUserErroron import ofSourceResponse,ConnectionResponse, and other models (#178 item 1). Root cause: Speakeasy emitted enum/class definitions after they were referenced as default values —from __future__ import annotationsdoesn't help since these are runtime expressions, not type annotations.Two built-in fix flags enabled in
gen.yaml:generation.fixes.nameResolutionFeb2025: true— improved name resolution; fixedConnectionResponse(RowFilteringOperationNotordering). Docs, CLI:speakeasy configure generation check.python.fixFlags.conflictResistantModelImportsFeb2026: true— conflict-resistant model imports; fixedSourceResponse(DimensionsFilterToValueExpressionValueTypeDoubleValue2ordering). CLI-only docs viaspeakeasy configure generation check.After regeneration: all 737 model modules import with zero failures.
Closes #178 (item 1).
Link to Devin session: https://app.devin.ai/sessions/854c664803f3400387fdaa02e123b888
Requested by: Aaron ("AJ") Steers (@aaronsteers)