replicateA_ consistency tests creates very large values
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 5.5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
Encountered when trying to upgrade fs2 to cats 2.8.0. The Monad[Chunk] and Alternative[Chunk] laws tests fail with out of memory errors. These tests use a Gen[Chunk[Int]] with a max size of 300 elements. The new replicateA_ consistent with replicateA.void test expands that to a 300^4 collection.
For now, I'll disable monad + alternative laws testing for Chunk since I don't see a straightforward way to skip that test.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked laws/src/main/scala/cats/laws/discipline/ApplicativeTests.scala at line 63 and inspect how the replicateA_ consistency law is generated. Reproduce the Monad[Chunk] and Alternative[Chunk] law tests and verify the large-value behavior. Done means the relevant Chunk laws run without out-of-memory failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100