Skip to content

fix(cli): Use FDR instead of hardcoded values to determine which IR version to supply to the generator#9815

Merged
jsklan merged 5 commits intomainfrom
jsklan/ir-migration-improvements-2
Oct 10, 2025
Merged

fix(cli): Use FDR instead of hardcoded values to determine which IR version to supply to the generator#9815
jsklan merged 5 commits intomainfrom
jsklan/ir-migration-improvements-2

Conversation

@jsklan
Copy link
Copy Markdown
Contributor

@jsklan jsklan commented Oct 9, 2025

Description

Improve IR migration by dynamically fetching IR version information from FDR instead of relying on hardcoded values. This change enhances the reliability and maintainability of the generator version compatibility system by querying the Fern registry for the exact IR version required by each generator.

Changes Made

  • Added getIrVersionForGenerator function to
    packages/core/src/services/fdrGeneratorsSdk.ts to fetch IR versions from FDR
  • Updated local generation (getIntermediateRepresentation.ts) to use FDR-sourced IR
    versions as fallback when no override is specified
  • Updated remote generation (createAndStartJob.ts) to use FDR-sourced IR versions
    as fallback for Fiddle service
  • Refactored compatible-ir-versions validation rule to use the centralized
    getIrVersionForGenerator function
  • Added version 0.86.1 to CLI versions with appropriate changelog entry
  • Exported new getIrVersionForGenerator function from core services module

Testing

  • Unit tests added/updated
  • Manual testing completed

@jsklan jsklan changed the title fix(cli): cli uses FDR instead of hardcoded values to determine which IR version to supply to the generator fix(cli): Use FDR instead of hardcoded values to determine which IR version to supply to the generator Oct 9, 2025
@jsklan jsklan marked this pull request as ready for review October 9, 2025 18:59
}
context.logger.debug("Generated IR");
const irVersionFromFdr = await getIrVersionForGenerator(generatorInvocation).then((version) =>
version == null ? undefined : "v" + version.toString()
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.

bruhh are these not normalized? We have to add a v to it?

@jsklan jsklan enabled auto-merge (squash) October 10, 2025 20:51
@jsklan jsklan merged commit a0f8198 into main Oct 10, 2025
98 checks passed
@jsklan jsklan deleted the jsklan/ir-migration-improvements-2 branch October 10, 2025 20:51
kennyderek pushed a commit that referenced this pull request Oct 14, 2025
…ersion to supply to the generator (#9815)

* Try fetching the ir version from fdr for the generator

* bump cli version

* format

* Update cli version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants