Skip to content

fix: escape type keyword in tracing::info! macros#4068

Merged
jackye1995 merged 1 commit into
lance-format:mainfrom
bjurkovski:escape-type-keyword-in-tracing-info
Jun 23, 2025
Merged

fix: escape type keyword in tracing::info! macros#4068
jackye1995 merged 1 commit into
lance-format:mainfrom
bjurkovski:escape-type-keyword-in-tracing-info

Conversation

@bjurkovski

Copy link
Copy Markdown
Contributor

I run into issues due to the use of the type keyword in tracing::info macros - this PR replaces it with the escaped r#type version.

Sample of the error I previously got:

error: no rules expected keyword `type`
    --> /Users/.../.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lance-table-0.30.0/src/io/deletion.rs:113:13
     |
113  |             info!(target: TRACE_FILE_AUDIT, mode=AUDIT_MODE_CREATE, type=AUDIT_TYPE_DELETION, path = path.to_string());
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no rules expected this token in macro call

@github-actions

Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@bjurkovski bjurkovski changed the title Escape type keyword in tracing::info! macros fix: Escape type keyword in tracing::info! macros Jun 22, 2025
@github-actions github-actions Bot added the bug Something isn't working label Jun 22, 2025
@bjurkovski bjurkovski changed the title fix: Escape type keyword in tracing::info! macros fix: escape type keyword in tracing::info! macros Jun 22, 2025

@jackye1995 jackye1995 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.

nice catch, looks good to me!

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 33.33333% with 14 lines in your changes missing coverage. Please review.

Project coverage is 78.81%. Comparing base (cf27c3d) to head (932a51e).

Files with missing lines Patch % Lines
rust/lance/src/dataset/cleanup.rs 0.00% 2 Missing and 5 partials ⚠️
rust/lance-table/src/io/deletion.rs 0.00% 0 Missing and 2 partials ⚠️
rust/lance/src/dataset/write.rs 0.00% 0 Missing and 2 partials ⚠️
rust/lance/src/index.rs 60.00% 1 Missing and 1 partial ⚠️
rust/lance/src/dataset.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4068      +/-   ##
==========================================
- Coverage   78.82%   78.81%   -0.02%     
==========================================
  Files         285      285              
  Lines      113731   113731              
  Branches   113731   113731              
==========================================
- Hits        89645    89633      -12     
- Misses      20650    20665      +15     
+ Partials     3436     3433       -3     
Flag Coverage Δ
unittests 78.81% <33.33%> (-0.02%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jackye1995 jackye1995 merged commit 931d1c4 into lance-format:main Jun 23, 2025
31 of 33 checks passed
Xuanwo pushed a commit that referenced this pull request Jul 22, 2025
Similar to #4068

Fixes
```
error: no rules expected keyword `type`
    --> /Users/.../.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lance-datafusion-0.31.1/src/exec.rs:350:5
     |
350  | /     tracing::info!(
351  | |         target: TRACE_EXECUTION,
352  | |         type = EXECUTION_PLAN_RUN,
353  | |         output_rows,
...    |
359  | |         index_comparisons = counts.index_comparisons,
360  | |     );
     | |_____^ no rules expected this token in macro call
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants