typelevel / cats

Lightweight, modular, and extensible library for functional programming.
https://typelevel.org/cats/
Other
5.26k stars 1.21k forks source link

Add distinctBy to NonEmptyCollection and all impls #4608

Closed cybersaurus closed 5 months ago

cybersaurus commented 5 months ago

First time contributor... 👋

What

Why

satorg commented 5 months ago

Thank you for the contribution! Despite my nitpicks above I really appreciate your work and believe that distinctBy would be a great addition to non-empty collections.

cybersaurus commented 5 months ago

Thank you for the contribution! Despite my nitpicks above I really appreciate your work and believe that distinctBy would be a great addition to non-empty collections.

Thanks for your feedback 👍 I think I've addressed all your comments now.

rossabaker commented 5 months ago

The errors in the native build are on suites that I otherwise can't find in the logs. I don't think they're related to this, but I don't really pay attention to Native, so I'm not the best one to help:

  [error] Error: Total 12586, Failed 0, Errors 27, Passed 12559
  [error] Error during tests:
  [error]   cats.tests.ListInstancesSuite
  [error]   cats.tests.FoldableSortedMapSuite
  [error]   cats.tests.ValidatedSuite
  [error]   cats.tests.ReducibleNonEmptyListSuite
  [error]   cats.tests.SplitSuite
  [error]   cats.tests.CategorySuite
  [error]   cats.tests.FoldableTrySuite
  [error]   cats.tests.TraverseStreamSuiteUnderlying
  [error]   cats.tests.FoldableEitherSuite
  [error]   cats.tests.InjectKSuite
  [error]   cats.tests.PartialOrderSuite
  [error]   cats.tests.TraverseListSuiteUnderlying
  [error]   cats.tests.VectorInstancesSuite
  [error]   cats.tests.BifunctorSuite
  [error]   cats.tests.FiniteDurationSuite
  [error]   cats.tests.FoldableEitherKSuite
  [error]   cats.tests.ReducibleNonEmptyLazyListSuite
  [error]   cats.tests.ParallelSuite
  [error]   cats.tests.ListSuite
  [error]   cats.tests.ApplicativeErrorSuite
  [error]   cats.tests.TraverseVectorSuiteUnderlying
  [error]   cats.tests.TailRecSuite
  [error]   cats.tests.MonoidSuite
  [error]   cats.tests.KleisliSuite
  [error]   cats.tests.EitherKSuite
  [error]   cats.tests.FoldableSuiteAdditional
  [error]   cats.tests.EqSuite
satorg commented 5 months ago

I don't think they're related to this

I don't think either. I noticed that after migration to native 0.5 the build became a bit flaky. I'll try to re-run the jobs.

satorg commented 5 months ago

The build has succeeded after the re-run 🎉

I wonder though what is wrong with Scala Native 0.5 that makes our build flaky 🤔 It bothers me a little.