Skip to content

[error] Use shortened and relative paths for files that raise errors in error messages to ensure privacy at compilation#200

Merged
forfudan merged 2 commits intodevfrom
error
Apr 10, 2026
Merged

[error] Use shortened and relative paths for files that raise errors in error messages to ensure privacy at compilation#200
forfudan merged 2 commits intodevfrom
error

Conversation

@forfudan
Copy link
Copy Markdown
Owner

@forfudan forfudan commented Apr 10, 2026

This PR updates Decimo’s error reporting to avoid exposing absolute file system paths in error messages by shortening file paths captured via call_location().

Changes:

  • Added a _shorten_path() helper to convert absolute paths into ./src/..., ./tests/..., ./benches/..., or filename-only paths.
  • Updated DecimoError.__init__ to store the shortened path instead of the raw call_location() path.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Decimo’s error reporting to avoid exposing absolute file system paths in error messages by shortening file paths captured via call_location().

Changes:

  • Added a _shorten_path() helper to convert absolute paths into ./src/..., ./tests/..., ./benches/..., or filename-only paths.
  • Updated DecimoError.__init__ to store the shortened path instead of the raw call_location() path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/decimo/errors.mojo Outdated
Comment thread src/decimo/errors.mojo
@forfudan forfudan merged commit 5aa3550 into dev Apr 10, 2026
11 checks passed
@forfudan forfudan deleted the error branch April 10, 2026 19:30
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