Skip to content

refactor builtin types in binder#1821

Merged
OmarTawfik merged 1 commit into
mainfrom
OmarTawfik/stacks/versions/2/rename-builtins-type
Jun 5, 2026
Merged

refactor builtin types in binder#1821
OmarTawfik merged 1 commit into
mainfrom
OmarTawfik/stacks/versions/2/rename-builtins-type

Conversation

@OmarTawfik

Copy link
Copy Markdown
Contributor

Small rename for the public API:

  • renames the public PublicBuiltin type to just Builtin, as it is used in the public API, and the "Public" prefix is redundant.
  • renames the internal Builtin type to InternalBuiltin, to make it clear that this should not be leaked to the public API.

@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9e66593

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

/// node kind and its contents.

#[derive(Clone, Debug)]
pub enum Typing {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ggiraldez I see that InternalBuiltin is still leaked via Typing and Resolution. Is this intended? should they be moved to use Builtin, given that conversion is cheap?

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.

We use Typing and Resolution in the AST crate, and that's where it should be contained. It should definitely not reach the public API. It should also be possible to make both types crate pub. I'll explore that and send a PR.

@OmarTawfik OmarTawfik marked this pull request as ready for review June 2, 2026 15:44
@OmarTawfik OmarTawfik requested review from a team as code owners June 2, 2026 15:44

@ggiraldez ggiraldez left a comment

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.

🚀

/// node kind and its contents.

#[derive(Clone, Debug)]
pub enum Typing {

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.

We use Typing and Resolution in the AST crate, and that's where it should be contained. It should definitely not reach the public API. It should also be possible to make both types crate pub. I'll explore that and send a PR.

Base automatically changed from OmarTawfik/stacks/versions/1/combine-templates-codegen to main June 5, 2026 17:11
@OmarTawfik OmarTawfik force-pushed the OmarTawfik/stacks/versions/2/rename-builtins-type branch from 338c538 to 9517308 Compare June 5, 2026 17:41
@OmarTawfik OmarTawfik enabled auto-merge June 5, 2026 17:42
Small rename for the public API:

- renames the public `PublicBuiltin` type to just `Builtin`, as it is used in the public API, and the "Public" prefix is redundant.
- renames the internal `Builtin` type to `InternalBuiltin`, to make it clear that this should not be leaked to the public API.
@OmarTawfik OmarTawfik force-pushed the OmarTawfik/stacks/versions/2/rename-builtins-type branch from 9517308 to 9e66593 Compare June 5, 2026 17:45
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

BranchOmarTawfik/stacks/versions/2/rename-builtins-type
Testbedci

⚠️ WARNING: Truncated view!

The full continuous benchmarking report exceeds the maximum length allowed on this platform.

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

🚨 6 Alerts

🐰 View full continuous benchmarking report in Bencher

@OmarTawfik OmarTawfik added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit 8259482 Jun 5, 2026
23 of 25 checks passed
@OmarTawfik OmarTawfik deleted the OmarTawfik/stacks/versions/2/rename-builtins-type branch June 5, 2026 18: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.

2 participants