Skip to content

Conversation

@nsajko
Copy link
Member

@nsajko nsajko commented May 11, 2025

Prevent dependent packages from commiting type piracy easily and unintentionally when defining an AbstractTrees trait for all subtypes of a type. Specifically: the bottom type, Union{}, is a subtype of each type, so add a method for the bottom type for each AbstractTrees trait. This method will take precedence over sane methods in dependent packages, thus preventing spurious type piracy.

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.49%. Comparing base (4fe5615) to head (2c0f73b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
+ Coverage   71.16%   71.49%   +0.32%     
==========================================
  Files           8        8              
  Lines         437      442       +5     
==========================================
+ Hits          311      316       +5     
  Misses        126      126              

☔ 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.

@nsajko nsajko force-pushed the guard_against_trait_type_piracy_in_a_dependent_package branch 3 times, most recently from 13728a5 to af7eee8 Compare May 11, 2025 21:03
@nsajko
Copy link
Member Author

nsajko commented Jun 11, 2025

Prevent dependent packages from commiting type piracy easily and
unintentionally when defining an AbstractTrees trait for all subtypes
of a type. Specifically: the bottom type, `Union{}`, is a subtype of
each type, so add a method for the bottom type for each AbstractTrees
trait. This method will take precedence over sane methods in dependent
packages, thus preventing spurious type piracy.
@nsajko nsajko force-pushed the guard_against_trait_type_piracy_in_a_dependent_package branch from af7eee8 to ecd0e9b Compare November 5, 2025 03:35
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