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

bugfix(compiler): Fix punctuation/newline of bare crate-root diagnostics. - #10087

Merged
orizi merged 1 commit into
mainfrom
orizi/06-11-bugfix_compiler_fix_punctuation_newline_of_bare_crate-root_diagnostics
Jun 14, 2026
Merged

orizi merged 1 commit into
mainfrom
orizi/06-11-bugfix_compiler_fix_punctuation_newline_of_bare_crate-root_diagnostics

Conversation

@orizi

@orizi orizi commented Jun 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a trailing period to two diagnostic error messages: "Failed to get main module file" and "{path} not found".


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

⚠️ Note:
To keep maintainer workload sustainable, we generally do not accept PRs that
are only minor wording, grammar, formatting, or style changes.
Such PRs may be closed without detailed review.


Why is this change needed?

Other diagnostic error messages in the codebase end with a period for consistency. These two messages were missing the trailing period, making them inconsistent with the rest of the diagnostic output.


What was the behavior or documentation before?

Error messages read:

  • "Failed to get main module file"
  • "{path} not found"

What is the behavior or documentation after?

Error messages read:

  • "Failed to get main module file."
  • "{path} not found."

Related issue or discussion (if any)


Additional context

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

orizi commented Jun 11, 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 11, 2026 15:14
@cursor

cursor Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Wording-only change to two error strings and one test assertion; no compilation or diagnostic logic changes.

Overview
Aligns two crate-root compiler error strings in DiagnosticsReporter::check with the usual trailing-period style: "Failed to get main module file." and "{path} not found." (still followed by \n).

The test_diagnostics expectation is updated so the missing lib.cairo message includes the period.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a57a343592

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/cairo-lang-compiler/src/diagnostics.rs
…ics.

  The "Failed to get main module file" and "{path} not found" messages
  reported when a crate's main module file is missing were inconsistent
  with every other diagnostic: the former lacked a trailing newline (so
  it ran into following output, since FormattedDiagnosticEntry's Display
  adds none and entries are emitted via eprint!), and both lacked the
  trailing period that diagnostic messages conventionally carry. Add the
  missing newline and periods.
@orizi
orizi force-pushed the orizi/06-11-bugfix_compiler_fix_punctuation_newline_of_bare_crate-root_diagnostics branch from a57a343 to c61ce65 Compare June 11, 2026 15:24
@orizi
orizi enabled auto-merge June 11, 2026 15:24

@TomerStarkware TomerStarkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm:

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

@orizi
orizi added this pull request to the merge queue Jun 14, 2026
Merged via the queue into main with commit 87ea9bc Jun 14, 2026
54 checks passed
@orizi
orizi deleted the orizi/06-11-bugfix_compiler_fix_punctuation_newline_of_bare_crate-root_diagnostics branch June 14, 2026 11:54
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.

3 participants