Skip to content

feat(generate): add Dart client renderer - #7

Merged
dev-jodee merged 2 commits into
mainfrom
feat/dart-renderer
Jul 17, 2026
Merged

feat(generate): add Dart client renderer#7
dev-jodee merged 2 commits into
mainfrom
feat/dart-renderer

Conversation

@dev-jodee

Copy link
Copy Markdown
Owner

What

Adds codama-renderers-dart as a fifth SDK target alongside TypeScript, Umi, Rust, and Go.

Stacked on #6 (base branch chore/refresh-deps). Merge #6 first, or rebase onto main after it lands.

Changes

  • lib/codama-types.ts: add dart to the Language union + LANGUAGES. The selector and compatibility checks are data-driven, so the UI picks it up automatically.
  • lib/codama-generate.ts: dart case in the render switch.
  • components/GeneratePanel.tsx: Dart "next steps" block.
  • next.config.ts: add to serverExternalPackages.

Two upstream gotchas handled

  1. Package is mispublishedcodama-renderers-dart's exports.import condition points at a .mjs that isn't in the tarball (all versions), breaking both the Turbopack build and the CJS test compile. Worked around by loading its intact CJS build via createRequire, anchored on process.cwd() (not import.meta.url, which the CJS test build rejects with TS1470).
  2. No pubspec.yaml — unlike the TS/Rust renderers, it emits only .dart sources (barrel + instructions/, pdas/, errors/, programs/; imports package:solana_kit_*). Help text tells users to add the solana_kit deps themselves.

Verification

npm run lint clean · npm test 25/25 · npm run build passes · live generate of a program IDL → Dart returns a valid zip with 12 .dart files.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dev-jodee, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0830a81d-a338-4645-a54a-763cd59ba2f4

📥 Commits

Reviewing files that changed from the base of the PR and between 20eb508 and e3e40d6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • components/GeneratePanel.tsx
  • lib/codama-generate.ts
  • lib/codama-types.ts
  • next.config.ts
  • package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dart-renderer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from chore/refresh-deps to main July 17, 2026 15:37
Wire codama-renderers-dart as a fifth SDK target alongside
TypeScript, Umi, Rust, and Go. The language list is data-driven, so the
selector and compatibility checks pick it up automatically.

The package is mispublished (its exports `import` condition points at a
.mjs absent from the tarball), so load its intact CJS build via
createRequire, anchored on cwd so it also compiles under the CJS test
build. The renderer emits only .dart sources (no pubspec.yaml); the help
text notes users must add the solana_kit dependencies themselves.
@dev-jodee
dev-jodee force-pushed the feat/dart-renderer branch from e336249 to e3e40d6 Compare July 17, 2026 15:40
@dev-jodee
dev-jodee merged commit 663f78b into main Jul 17, 2026
2 checks passed
@dev-jodee
dev-jodee deleted the feat/dart-renderer branch July 17, 2026 15:43
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.

1 participant