Skip to content

Conversation

@chakkk309
Copy link
Contributor

Which issue does this PR close?

Part of #18881

Rationale for this change

Implement clippy::allow_attributes lint for datafusion-common and datafusion-common-runtime crates

What changes are included in this PR?

  • Add #![deny(clippy::allow_attributes)] to both crates
  • Convert #[allow(...)] to #[expect(...)] attributes
  • Remove unnecessary lint suppressions discovered through unfulfilled expectations

Are these changes tested?

yes

Are there any user-facing changes?

No user-facing changes.

@github-actions github-actions bot added the common Related to common crate label Nov 29, 2025
// $(#[allow(deprecated)])?
{
$(let value = $transform(value);)? // Apply transformation if specified
#[allow(deprecated)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I wonder if there was a historical reason these allow deprecations were present; was it anticipating future compatibility? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

it may have been needed for code that was subsequently updated but the allow(deprecated) annotation was not. That is why I like the expect(deprecated) style as then the compiler will tell you when it is no longer actually needed

chakkk309 and others added 6 commits November 29, 2025 21:57
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
…utes-for-common-crates' into chore-enforce-clippyallow_attributes-for-common-crates
@chakkk309 chakkk309 force-pushed the chore-enforce-clippyallow_attributes-for-common-crates branch from 980020f to 9ad4fe0 Compare November 30, 2025 06:42
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like a nice improvement to me -- thank you @chakkk309 and @Jefffrey

{
// Ok to use spawn here as SpawnedTask handles aborting/cancelling the task on Drop
#[allow(clippy::disallowed_methods)]
#[expect(clippy::disallowed_methods)]
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

// $(#[allow(deprecated)])?
{
$(let value = $transform(value);)? // Apply transformation if specified
#[allow(deprecated)]
Copy link
Contributor

Choose a reason for hiding this comment

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

it may have been needed for code that was subsequently updated but the allow(deprecated) annotation was not. That is why I like the expect(deprecated) style as then the compiler will tell you when it is no longer actually needed

@alamb alamb added this pull request to the merge queue Nov 30, 2025
Merged via the queue into apache:main with commit 2bfa64d Nov 30, 2025
27 checks passed
@chakkk309 chakkk309 deleted the chore-enforce-clippyallow_attributes-for-common-crates branch December 1, 2025 06:33
ShashidharM0118 pushed a commit to ShashidharM0118/datafusion that referenced this pull request Dec 1, 2025
## Which issue does this PR close?

Part of apache#18881

## Rationale for this change

Implement clippy::allow_attributes lint for **datafusion-common** and
**datafusion-common-runtime** crates

## What changes are included in this PR?
 - Add #![deny(clippy::allow_attributes)] to both crates
 - Convert #[allow(...)] to #[expect(...)] attributes
- Remove unnecessary lint suppressions discovered through unfulfilled
expectations

## Are these changes tested?

yes

## Are there any user-facing changes?

No user-facing changes.

---------

Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants