Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rust): point location!() macro at Github in release builds #3196

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wjones127
Copy link
Contributor

@wjones127 wjones127 commented Dec 4, 2024

Currently, when a user reports an error, we get locations like:

rust/lance-core/src/error.rs
/home/runner/work/lance/lance/rust/lance-core/src/error.rs
/src/lance/rust/lance-core/src/error.rs

In order to find the actual line, an engineer has to:

  1. Ask the user what version they are running. If they are using a downstream package, they need to translate that version into a Lance version.
  2. Open up that version in git/GitHub.
  3. Find the file location.

This PR automates this by rewriting the location at compile time to the correct GitHub URL:

https://github.com/lancedb/lance/blob/v0.19.2/rust/lance-table/src/format.rs#L42

This is enabled by a feature error_location_github which is off by default. We only activate it in Python releases.

@github-actions github-actions bot added enhancement New feature or request python labels Dec 4, 2024
@wjones127
Copy link
Contributor Author

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 42.55319% with 27 lines in your changes missing coverage. Please review.

Project coverage is 78.39%. Comparing base (10c31b3) to head (aaaf737).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
rust/lance-core/src/error.rs 42.55% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3196      +/-   ##
==========================================
- Coverage   78.48%   78.39%   -0.09%     
==========================================
  Files         244      244              
  Lines       84554    84601      +47     
  Branches    84554    84601      +47     
==========================================
- Hits        66360    66324      -36     
- Misses      15390    15471      +81     
- Partials     2804     2806       +2     
Flag Coverage Δ
unittests 78.39% <42.55%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants