Skip to content

Commit

Permalink
docs: update README.md before 0.2.0 release
Browse files Browse the repository at this point in the history
- remove resolved limitations
- add entry to version matrix
  • Loading branch information
MartinHH committed Apr 23, 2023
1 parent a64ccc2 commit 4c4ac90
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,14 @@ The derivation mechanism uses inlining. Depending on the size of the data struct
wants to derive an `Arbitrary`, it is possible to hit the compiler's maximum limit for number of
successive inlines.

In that case, compilation *should* fail with a message saying:
In that case, compilation will fail with a message like this one:

```
[error] | Maximal number of successive inlines (32) exceeded,
[error] | Maybe this is caused by a recursive inline method?
[error] | You can use -Xmax-inlines to change the limit.
```

However, it may also fail with a less helpful message like this one (where `MyTestSuite` is the
name of the class in from which derivation was tried from):

```
[error] |object GensList cannot be accessed as a member of (ArbitraryDeriving_this :
[error] | (ArbitraryDeriving_this² : io.github.martinhh.derived.ArbitraryDeriving)
[error] |) from class MyTestSuite.
[error] |
[error] |where: ArbitraryDeriving_this is a value in the initializer of value gens
[error] | ArbitraryDeriving_this² is a value in an anonymous function locally defined in class MyTestSuite
```

#### Workarounds

There are two ways to handle this:
Expand All @@ -104,12 +92,6 @@ There are two ways to handle this:
2. instead of deriving an `Arbitrary` for the whole structure at once, derive "intermediate"
instances for some of its members (and place them into implicit scope).

### Cogens / deriving functions

Derivation of `Cogen` instances is not supported (yet).

This means that you cannot, for example, derive a function of type `LibItem => Int`.

## Version matrix

The following table documents which versions of scalacheck, scala, scala-js and scala-native were
Expand All @@ -118,3 +100,4 @@ used for each release:
| scalacheck-derived | scalacheck | scala | scala-js | scala-native |
|--------------------|------------|-------|----------|--------------|
| 0.1.0 | 1.17.0 | 3.2.2 | 1.13.0 | 0.4.12 |
| 0.2.0 | 1.17.0 | 3.2.2 | 1.13.0 | 0.4.12 |

0 comments on commit 4c4ac90

Please sign in to comment.