Sitelet https://github.com/starkware-libs/cairo/pull/10172
Skip to content

(bug fix): close ']' in FixedSizeArray type short_name - #10172

Merged
orizi merged 1 commit into
mainfrom
orizi/fix-fixed-size-array-short-name
Jun 29, 2026
Merged

orizi merged 1 commit into
mainfrom
orizi/fix-fixed-size-array-short-name

Conversation

@orizi

@orizi orizi commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes the FixedSizeArray type short name formatting by adding the missing closing bracket ]. The format string was "[{}; {:?}", which produced malformed output like [u8; 3 instead of the correct [u8; 3].


Type of change

Please check one:

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

Why is this change needed?

The priv_type_short_name function was producing an unclosed bracket when formatting FixedSizeArray types, resulting in invalid/misleading type name strings.


What was the behavior or documentation before?

FixedSizeArray short names were formatted as [<type>; <size> (missing the closing ]).


What is the behavior or documentation after?

FixedSizeArray short names are now correctly formatted as [<type>; <size>].


Related issue or discussion (if any)

None.


Additional context

None.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

orizi commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@orizi
orizi marked this pull request as ready for review June 29, 2026 04:36
@cursor

cursor Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Single format-string fix in display-only code with no behavior change beyond correct type label strings.

Overview
priv_type_short_name for TypeLongId::FixedSizeArray now ends the string with a closing ], matching the array syntax used elsewhere (e.g. DebugWithDb).

The format string changes from "[{}; {:?}" to "[{}; {:?}]", so compact type labels look like [u8; 3] instead of [u8; 3 in diagnostics, hashed generic-arg display, and other callers of TypeId::short_name.

Reviewed by Cursor Bugbot for commit 6b7f901. Bugbot is set up for automated code reviews on this repo. Configure here.

@eytan-starkware eytan-starkware 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.

:lgtm:

@eytan-starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on TomerStarkware).

@orizi
orizi added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit 6d10ce9 Jun 29, 2026
55 checks passed

Copy link
Copy Markdown

Security scan complete — no issues detected.


Generated by Claude Code

@orizi
orizi deleted the orizi/fix-fixed-size-array-short-name branch June 29, 2026 13:25
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.

4 participants