Skip to content

Conversation

@toinehartman
Copy link
Member

@toinehartman toinehartman commented Jan 29, 2026

@toinehartman toinehartman self-assigned this Jan 29, 2026
@toinehartman toinehartman marked this pull request as draft January 29, 2026 10:29
@toinehartman toinehartman removed the request for review from PaulKlint January 29, 2026 10:29
@toinehartman toinehartman changed the title Remove functions that moved to typepal Remove obsolete functions Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46%. Comparing base (9c8d7ea) to head (8039269).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2616   +/-   ##
=======================================
  Coverage       46%     46%           
+ Complexity    6644    6641    -3     
=======================================
  Files          793     793           
  Lines        65719   65719           
  Branches      9844    9844           
=======================================
+ Hits         30600   30601    +1     
+ Misses       32758   32757    -1     
  Partials      2361    2361           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@toinehartman toinehartman force-pushed the fix/remove-duplicate-functions branch from feb2812 to 745a65f Compare January 29, 2026 12:02
@toinehartman toinehartman marked this pull request as ready for review January 29, 2026 12:05
@toinehartman
Copy link
Member Author

@PaulKlint Can you please confirm which of the copies should remain?

@toinehartman toinehartman force-pushed the fix/remove-duplicate-functions branch from 745a65f to 8039269 Compare January 29, 2026 14:12
}

// Note: this is a duplicate of LogicalLocation in typepal
// TODO: remove the one in TypePal
Copy link
Member

Choose a reason for hiding this comment

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

The TODO here says the goal was the reverse of this PR?

Copy link
Member Author

@toinehartman toinehartman Jan 29, 2026

Choose a reason for hiding this comment

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

Yes. There are now multiple copies of this:

https://github.com/usethesource/typepal/blob/60cb6ea4febf0bf1152ec0d81279ebacc7beaaf6/src/analysis/typepal/StringSimilarity.rsc#L70-L73

https://github.com/usethesource/typepal/blob/60cb6ea4febf0bf1152ec0d81279ebacc7beaaf6/src/analysis/typepal/Collector.rsc#L35-L40

I don't think this is supposed to really be in the standard library, since the use seems very specific to TModels with physical locations. If it is supposed to be released to users, we should clearly document the functions (especially the map parameter).

Copy link
Member

Choose a reason for hiding this comment

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

The blame on the line says that it's added very recently by @PaulKlint.

My main question is, why are we going against what the TODO is saying (since it's a recent TODO)?

Copy link
Member

Choose a reason for hiding this comment

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

It seems my comment was not recorded here:

Sorry for the confusion here. Initial plan was to provide these functions with an extra mapping parameter as generic functionality. Later I came to the conclusion that it is better not to expose this and hide the mapping details in Collector and Solver. I should have removed these functions myself.

Copy link
Member

@PaulKlint PaulKlint left a comment

Choose a reason for hiding this comment

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

See remarks. It is fine to remove these functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants