Skip to content

Commit

Permalink
docs: Document that you need Scala 3.4 or 2.13.x with -Xsource:3
Browse files Browse the repository at this point in the history
Closes #88
  • Loading branch information
oyvindberg committed Apr 23, 2024
1 parent e51e944 commit 986f5e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion site-in/other-features/flexible.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ of integrating Typo piece-by-piece into your code base.

## Developed in the Scala 2/3 shared subset

Everything works on Scala 2.13 and 3.3.
Everything works on Scala 2.13 and 3.4.

For *2.13* you need to set add `-Xsource:3` to `scalacOptions`. The shared subsets shrinks in size for every Scala 3 release, unfortunately.

## Bring your own DB library

Expand Down
7 changes: 6 additions & 1 deletion site-in/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ put it in `gen-db.sc` and run `scala-cli gen-db.sc`
// remember to give the project a github star if you like it <3
//
//> using dep "com.olvind.typo::typo:@VERSION@"
//> using scala "3.3.0"
//> using scala "3.4.0"

import typo.*

Expand Down Expand Up @@ -72,6 +72,11 @@ generateFromDb(options, targetFolder = targetDir, selector = selector, scriptsPa
//scala.sys.process.Process(List("git", "add", targetDir.toString)).!!
```

## Compiling the generated code

For **Scala 2** you need to set add `-Xsource:3` to `scalacOptions`, with a recent version of Scala 2.13.
For **Scala 3** you'll need 3.4.0 or later.

## `selector`
You can customize which relations you generate code for, see [customize selected relations](customization/customize-selected-relations.md)

Expand Down

0 comments on commit 986f5e4

Please sign in to comment.