Skip to content

Commit

Permalink
swap 2 branches in How to compile section
Browse files Browse the repository at this point in the history
add 2 versions into build matrix

update document
  • Loading branch information
tribbloid committed Nov 5, 2023
1 parent 17a9f8d commit 874bc62
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ project/plugins/project/

# VSCode
.vscode/
.obsidian/

# BSP & Metals
.bsp/
Expand Down
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ We strongly recommend you to upgrade to Scala 2.13.6+ to benefit from active sup
### Build Matrix

| Version | Status | Compatibility |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| v1.x <br> (current) - latest | [![CI](https://github.com/tek/splain/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/tek/splain/actions/workflows/main.yml) | ![badge](https://github-actions.40ants.com/tek/splain/matrix.svg?branch=master) |
| v1.0.3 <br> (current) | [![CI](https://github.com/tek/splain/actions/workflows/main.yml/badge.svg?branch=Release/1.0.3)](https://github.com/tek/splain/actions/workflows/main.yml) | ![badge](https://github-actions.40ants.com/tek/splain/matrix.svg?branch=Release/1.0.3) |
| v1.0.2 <br> (current) | [![CI](https://github.com/tek/splain/actions/workflows/main.yml/badge.svg?branch=Release/1.0.2)](https://github.com/tek/splain/actions/workflows/main.yml) | ![badge](https://github-actions.40ants.com/tek/splain/matrix.svg?branch=Release/1.0.2) |
| v1.0.1 <br> (current) | [![CI](https://github.com/tek/splain/actions/workflows/main.yml/badge.svg?branch=Release/1.0.1)](https://github.com/tek/splain/actions/workflows/main.yml) | ![badge](https://github-actions.40ants.com/tek/splain/matrix.svg?branch=Release/1.0.1) |
| v1.0.0 <br> (current) | [![CI](https://github.com/tek/splain/actions/workflows/main.yml/badge.svg?branch=Release/1.0.0)](https://github.com/tek/splain/actions/workflows/main.yml) | ![badge](https://github-actions.40ants.com/tek/splain/matrix.svg?branch=Release/1.0.0) |
| v1.0.0-RC2 <br> (current) | [![CI](https://github.com/tek/splain/actions/workflows/main.yml/badge.svg?branch=Release/1.0.0-RC2)](https://github.com/tek/splain/actions/workflows/main.yml) | ![badge](https://github-actions.40ants.com/tek/splain/matrix.svg?branch=Release/1.0.0-RC2) |
Expand Down Expand Up @@ -116,10 +118,10 @@ The plugin can be configured via compiler Options with the format:

| v0.x | built-in, v1.x | default value |
| ----------------- |-------------------------------------------|------------------|
| `all` | (dropped) | |
| `all` | `enabled` | true |
| `infix` | (dropped) | |
| `foundreq` | `Vtype-diffs` | |
| `implicits` | `Vimplicits` | |
| `foundreq` | `Vtype-diffs` | false |
| `implicits` | `Vimplicits` | false |
| `bounds` | (dropped) | false |
| `color` | (dropped) | |
| `breakinfix` | (dropped) | 0 |
Expand Down Expand Up @@ -323,6 +325,19 @@ The option `-P:splain:Vtype-detail:X` can take an integer from 1 to 6 to attach
- `5` = `4` + (**position** : type definition position in code)
- `6` = `5` + (**alias** : explain type aliases, this generally contains duplicate information with `3`, it is only included for completeness)

For example:

(`-P:splain:Vtype-detail:1`)

```
XXX.scala:15: error: type mismatch;
Test.F[Test.a.type|a.type]
```

(`-P:splain:Vtype-detail:6`)

![](img/bc959e77.png)

In addition, multiple names of the detail kind (denoted by bold text in the above list) can be appended to the option value to enable it, e.g. `-P:splain:Vtype-detail:1,reduction,position` can attach type reduction process & type definition position while bypassing **long** and **existential**.

# type diffs detail (experimental)
Expand All @@ -336,6 +351,20 @@ The option `-P:splain:Vtype-diffs-detail:X` can take an integer from 1 to 4 to a

In addition, multiple names of the detail kind (denoted by bold text in the above list) can be appended to the option value to enable it, e.g. `-P:splain:Vtype-diffs-detail:1,builtIn` can attach built-in errors while bypassing **disambiguation**.

For example:

(`-P:splain:Vtype-diffs-detail:1`)

```
XXX.scala:16: error: implicit error;
!I ev: Long =:= Long
Cannot prove that Long =:= Long.
```

(`-P:splain:Vtype-diffs-detail:4`)

![](img/86df485f.png)

# Development

## Bugs
Expand All @@ -356,34 +385,36 @@ The bug can thus be identified by the team quickly on our [continuous integratio

## How to compile

### v0.x (from git branch Maintenance/master)
### v1.x (from git branch master)

Built with the latest stable [SBT](https://www.scala-sbt.org/). to compile and publish locally:
Built with the latest [Gradle](https://gradle.org/), to compile and publish locally:

```
sbt clean publishM2
./gradlew clean testClasses publishToMavenLocal
```

to run all tests:

```
sbt test
./gradlew test
```

### v1.x (from git branch master)

Built with the latest [Gradle](https://gradle.org/), to compile and publish locally:
### v0.x (from git branch Maintenance/master)

Built with the latest stable [SBT](https://www.scala-sbt.org/). to compile and publish locally:

```
./gradlew clean testClasses publishToMavenLocal
sbt clean publishM2
```

to run all tests:

```
./gradlew test
sbt test
```


## How to edit

Most project contributors uses neovim, IntelliJ IDEA or visual studio code.
Expand Down
Binary file added img/86df485f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions img/VtypeDetail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
XXX.scala:15: error: type mismatch;

- Test.F\[

- Test.a.type (<label class="ob-comment" title="" style="background:red"> with underlying type Test.A <input type="checkbox"> <span style=""> long </span></label>)|a.type (with underlying type a.type) <label class="ob-comment" title="" style="background:orange"> where val a: Test.A <input type="checkbox"> <span style=""> existential </span></label> (<label class="ob-comment" title="" style="background:yellow"> defined at newSource1.scala:13:18 <input type="checkbox"> <span style=""> position </span></label>)

- <label class="ob-comment" title="" style="background:green"> ――(left side reduced from) <input type="checkbox"> <span style=""> reduction </span></label>

- Test.AA <label class="ob-comment" title="" style="background:blue"> (which expands to) Test.a.type <input type="checkbox"> <span style=""> alias </span></label>

- \]
13 changes: 13 additions & 0 deletions img/VtypeDiffsDetail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
XXX.scala:16: error: implicit error;

- !I ev:

- Long(<label class="ob-comment" title="" style="background:red"> in method add <input type="checkbox"> <span style=""> disambiguation </span></label>) =:= scala.Long

- ――(<label class="ob-comment" title="" style="background:yellow"> comparing \<found\> =:= \<required\> <input type="checkbox"> <span style=""> builtIn </span></label>)

- found : Long(in method add)

- required: scala.Long

- Cannot prove that Long =:= Long.
Binary file added img/bc959e77.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 874bc62

Please sign in to comment.