Skip to content

Commit 67dac79

Browse files
authored
Merge pull request #117 from MasseGuillaume/cross-compile
Cross compile scalafix input and output with 2.11, 2.12 and 2.13
2 parents af0c28e + 99d5a4d commit 67dac79

35 files changed

+409
-169
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ matrix:
7474
before_script: ./checkCLA.sh
7575
script:
7676
- java -version
77-
- admin/build.sh
77+
- sbt ci
7878

7979
cache:
8080
directories:

CONTRIBUTING.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ class toIteratorVsIterator(xs: Iterable[Int]) {
3838
}
3939
~~~
4040

41-
3. Add a corresponding file in the `scalafix/output213/src/main/scala/fix/` directory
41+
3. Add a corresponding file in the `scalafix/output/src/main/scala/fix/` directory
4242
with the same code but using the strawman:
4343

4444
~~~ scala
45-
import strawman.collection.Iterable
45+
import scala.collection.compat._
4646

4747
class toIteratorVsIterator(xs: Iterable[Int]) {
4848
xs.iterator
@@ -68,10 +68,50 @@ migration tool on the input files and check whether the result matches the
6868
expected output files:
6969

7070
~~~
71-
> scalafixTests/test
71+
> scalafix-tests/test
7272
~~~
7373

7474
Fix the implementation of the rule (in the
7575
`rules/src/main/scala/fix/NewCollections.scala` file) until the
7676
tests are green. You can find more help about the scalafix API in its
7777
[documentation](https://scalacenter.github.io/scalafix/docs/rule-authors/setup).
78+
79+
80+
### Scalafix Teskit Directory Layout
81+
82+
```
83+
.
84+
├── data |
85+
│   └── src |
86+
│   └── main |
87+
│   └── scala | Project to avoid duplicating code between input and output
88+
├── input |
89+
│   └── src |
90+
│   └── main |
91+
│   ├── scala | Input that cross-compile
92+
│   └── scala-2.12 | 2.12 specific input
93+
├── output |
94+
│   └── src |
95+
│   └── main |
96+
│   └── scala | Output that cross-compile
97+
├── output212 |
98+
│   └── src |
99+
│   └── main |
100+
│   └── scala-2.12 | 2.12 specific output
101+
├── output213 |
102+
│   └── src |
103+
│   └── main |
104+
│   └── scala | 2.13 specific output (from a cross-compiled input)
105+
├── output213-failure |
106+
│   └── src |
107+
│   └── main |
108+
│   └── scala | 2.13 specific output that cannot be migrated due to technical limitations
109+
├── rules |
110+
│   └── src |
111+
│   └── main |
112+
│   └── scala | Rule implementations
113+
└── tests |
114+
└── src |
115+
└── test |
116+
└── scala | Scalafix testkit launcher (useful to run a single input file)
117+
```

admin/build.sh

Lines changed: 0 additions & 69 deletions
This file was deleted.

admin/gpg.sbt

Lines changed: 0 additions & 2 deletions
This file was deleted.

admin/pre-release.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
# Copied from the output of genKeyPair.sh
4+
K=$encrypted_8c7005201bb0_key
5+
IV=$encrypted_8c7005201bb0_iv
6+
openssl aes-256-cbc -K $K -iv $IV -in admin/secring.asc.enc -out admin/secring.asc -d

admin/publish-settings.sbt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)