Skip to content

Commit

Permalink
build windows also against JDK 11
Browse files Browse the repository at this point in the history
introduce typealias CharSequenceOrNumberOrChar for Any

move CharSequenceOrNumberOrChar to domain-api and use in domain-impl

update setup instructions for the new infix API

include the new infix API to be published

preparation for accepting String instead of Zoned/LocalDate(Time) object

preparation for robstoll#480, robstoll#481 and robstoll#482

refer to current milestone in good_first_issue template

fix link for nullableContainer

return empty message in case callee is org.spekframework.ide

reduce code duplication also for jvm specs, add more cases to PathSpec

fix wrong replacements and workaround KT-38721 (add import next to star)

api-fluent work done

commiting requested changes

updated with comments

adding problematic classes which break the build

adding problemtic code to server to reproduce error

reproducing problematic build on CI

fix to build problem

addressing latest comment, build should pass

adjust the pseudo-keyword from exist to existing

moved infix jdk8 extension to jvm module

rebasing
  • Loading branch information
robstoll authored and assaflei committed May 15, 2020
1 parent 09135ea commit 336b601
Show file tree
Hide file tree
Showing 128 changed files with 2,840 additions and 1,083 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Please choose the appropriate template and fill in all sections
*Affected Version*:
*API* (fluent-en_GB, cc or cc-infix):
*Platform* (jvm, js, android):
*Extension* (none, kotlin 1.3, jdk8): none
*Extension* (none, kotlin 1.3): none

## How to reproduce the problem
Consider the following code snippet
Expand All @@ -25,7 +25,7 @@ A clear and concise description of what you expected to happen.
# Feature Request

*Platform* (jvm, js, android):
*Extension* (none, kotlin 1.3, jdk8): none
*Extension* (none, kotlin 1.3): none

## Code related feature
```
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ labels: bug
*Affected Version*:
*API* (fluent-en_GB, cc or cc-infix):
*Platform* (jvm, js, android):
*Extension* (none, kotlin 1.3, jdk8): none
*Extension* (none, kotlin 1.3): none

## How to reproduce the problem
Consider the following code snippet
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ about: Suggest an idea for this project
---

*Platform* (jvm, js, android):
*Extension* (none, kotlin 1.3, jdk8): none
*Extension* (none, kotlin 1.3): none

## Code related feature
```
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/good_first_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Create a good first issue
labels: good first issue, help wanted
---
*Platform* (jvm, js, android):
*Extension* (none, kotlin 1.3, jdk8): none
*Extension* (none, kotlin 1.3): none

## Code related feature
```
Expand All @@ -18,8 +18,8 @@ expect(
Following the things you need to do:


*lib*
- [ ] implement _foo in xyAssertions by using the `ExpectImpl.feature.extractor...`
*domain-robstoll-lib*
- [ ] implement _foo in xyAssertions.kt by using the `ExpectImpl.feature.extractor...`

*domain*
- [ ] extend XyAssertions with a function `foo` (see YzAssertions as a guideline)
Expand All @@ -29,13 +29,13 @@ Following the things you need to do:
*api-fluent*
- [ ] provide a val which returns `Expect<T>` (see yzAssertions.kt as a guideline)
- [ ] provide a fun which expects an `assertionCreator`-lambda and returns `Expect<AB>` (see yzAssertions.kt as a guideline)
- [ ] add `@since 0.12.0` (adapt to next release version) to KDOC
- [ ] add `@since 0.12.0` (adapt to current [milestone](https://github.com/robstoll/atrium/milestones)) to KDOC
- [ ] extend or write a separate Spec named XyFeatureAssertionsSpec in specs-common (see for instance YzFeatureAssertionsSpec) and extend it in atrium-api-fluent-en_GB-common/src/test

*api-infix*
- [ ] provide a val which returns `Expect<T>` (see yzAssertions.kt as a guideline)
- [ ] provide a fun which expects an `assertionCreator`-lambda and returns `Expect<AB>` (see yzAssertions.kt as a guideline)
- [ ] add `@since 0.12.0` (adapt to next release version) to KDOC
- [ ] add `@since 0.12.0` (adapt to current [milestone](https://github.com/robstoll/atrium/milestones)) to KDOC
- [ ] extend or write a separate Spec named XyFeatureAssertionsSpec in specs-common (see for instance YzFeatureAssertionsSpec) and extend it in atrium-api-infix-en_GB-common/src/test


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: true
matrix:
java_version: [9, 10, 12, 13, 14]
java_version: [9, 10, 11, 12, 13, 14]

steps:
- uses: actions/checkout@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ out
*.iml
node_modules
.github/**/*.tpl.md
*.hprof
63 changes: 33 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,11 @@ which provides a pure fluent API (in en_GB) for the JVM platform.
Have a look at the [JVM sample projects](https://github.com/robstoll/atrium/tree/master/samples/jvm) for a quick setup.

We currently provide the following extensions for the JVM platform:
- jdk8: assertion functions for JDK 8 specific types (e.g. for `Path`)
- kotlin_1_3: assertion functions for Kotlin 1.3 specific types (e.g. for [Result](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/index.html)).

You can enable them as follows:
```
dependencies {
testImplementation "ch.tutteli.atrium:atrium-api-fluent-en_GB-jdk8:$atrium_version"
testImplementation "ch.tutteli.atrium:atrium-api-fluent-en_GB-kotlin_1_3:$atrium_version"
testRuntimeOnly "ch.tutteli.atrium:atrium-domain-robstoll-kotlin_1_3:$atrium_version"
}
Expand All @@ -122,26 +120,29 @@ dependencies {
<details>
<summary>click to see how the setup for the infix API looks like</summary>


The new infix API which is based on `Expect` and no longer on `Assert` is not yet available in v0.11.0.
[Your help](https://github.com/robstoll/atrium/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22good+first+issue%22++new+infix)
in bringing the new infix API forward is appreciated.

Please use the old API in the meantime (not available on mavenCentral). Following an example:

```
buildscript {
ext { atrium_version='0.8.0' }
ext { atrium_version='0.11.0' }
}
repositories {
jcenter()
// either use jcenter or the repository on the next line
mavenCentral()
// either use mavenCentral() or one of the two lines below
// jcenter()
// maven { url "https://dl.bintray.com/robstoll/tutteli-jars" }
}
dependencies {
testImplementation "ch.tutteli.atrium:atrium-cc-infix-en_GB-robstoll:$atrium_version"
testImplementation "ch.tutteli.atrium:atrium-infix-en_GB:$atrium_version"
}
```

And for the aforementioned extensions:
```
dependencies {
testImplementation "ch.tutteli.atrium:atrium-api-infix-en_GB-kotlin_1_3:$atrium_version"
testRuntimeOnly "ch.tutteli.atrium:atrium-domain-robstoll-kotlin_1_3:$atrium_version"
}
```

<hr/>
</details>
<br/>
Expand Down Expand Up @@ -204,24 +205,26 @@ dependencies {
<details>
<summary>click to see how the setup for the infix API looks like</summary>


The new infix API which is based on `Expect` and no longer on `Assert` is not yet available in v0.11.0.
[Your help](https://github.com/robstoll/atrium/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22good+first+issue%22++new+infix)
in bringing the new infix API forward is appreciated.

Please use the old API in the meantime (not available on mavenCentral). Following an example:

```
buildscript {
ext { atrium_version='0.8.0' }
ext { atrium_version='0.11.0' }
}
repositories {
jcenter()
// either use jcenter or the repository on the next line
mavenCentral()
// either use mavenCentral() or one of the two lines below
// jcenter()
// maven { url "https://dl.bintray.com/robstoll/tutteli-jars" }
}
dependencies {
testImplementation "ch.tutteli.atrium:atrium-cc-infix-en_GB-robstoll:$atrium_version"
testImplementation "ch.tutteli.atrium:atrium-infix-en_GB-js:$atrium_version"
}
```

and for the aforementioned extensions:
```
dependencies {
testImplementation "ch.tutteli.atrium:atrium-api-infix-en_GB-kotlin_1_3-js:$atrium_version"
testRuntimeOnly "ch.tutteli.atrium:atrium-domain-robstoll-kotlin_1_3-js:$atrium_version"
}
```
<hr/>
Expand Down Expand Up @@ -1369,9 +1372,8 @@ expected that subject: /root/.ssh/config (sun.nio.fs.UnixPath <1234789>)
◆ equals: writable
» failure at parent path: /root (sun.nio.fs.UnixPath <1234789>)
» access was denied
» the owner is root, the group is root
» the permissions are u=rwx g= o=
```
» the owner is root, the group is root
» the permissions are u=rwx g= o=```
</ex-path-writable>
Even in more complicated scenarios, Atrium explains step by step what happened:
Expand Down Expand Up @@ -2349,7 +2351,7 @@ Atrium provides bundle modules which bundle API, translation, domain and core as
so that you just have to have a dependency on one of those bundles (kind a bit like a BOM pom in the maven world):

- [atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/fluent-en_GB/atrium-fluent-en_GB-common/build.gradle)
- [atrium-cc-infix-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/build.gradle)
- [atrium-infix-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/infix-en_GB-robstoll/atrium-infix-en_GB-robstoll-common/build.gradle)

Have a look at
[apis/differences.md](https://github.com/robstoll/atrium/tree/master/apis/differences.md)
Expand All @@ -2369,7 +2371,7 @@ You need to use a cast to do this. But depending on your return type this might
Thus, Atrium provides the following functions to ease dealing with Java Code at least for some standard cases:
- [`nullable`](https://github.com/robstoll/atrium/tree/master/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/nullable.kt#L19)
turns a type into a nullable type.
- [`nullableContainer`](https://github.com/robstoll/atrium/tree/master/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/nullable.kt#40)
- [`nullableContainer`](https://github.com/robstoll/atrium/tree/master/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/nullable.kt#L40)
turns an `Iterable` into an iterable with nullable element type, likewise it does the same for `Array`.
- [`nullableKeyMap`](https://github.com/robstoll/atrium/tree/master/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/nullable.kt#L66)
turns a `Map` into a map with a nullable key type.
Expand Down Expand Up @@ -2432,12 +2434,13 @@ expect(sequenceOf(1, 2, 3)).feature { f(it::asIterable) }.contains(2)

Atrium provides KDoc for all APIs - have a look at their KDoc:
- [atrium-api-fluent-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.fluent.en_-g-b/index.html)
- [atrium-api-cc-infix-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.infix.en_-g-b/index.html)
- [atrium-api-infix-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.infix.en_-g-b/index.html)

Deprecated APIs:
- [atrium-api-cc-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.en_-g-b/index.html)
- [atrium-api-cc-en_UK](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.en_-u-k/index.html)
- [atrium-api-cc-de_CH](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.de_-d-e/index.html)
- [atrium-api-cc-infix-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.infix.en_-g-b/index.html)

## Problems in conjunction with `feature`

Expand Down
1 change: 1 addition & 0 deletions act/actions-setup-java@v1
Submodule actions-setup-java@v1 added at b74d5a
1 change: 1 addition & 0 deletions act/codecov-codecov-action@v1
Submodule codecov-codecov-action@v1 added at e34ee4
1 change: 1 addition & 0 deletions act/[email protected]
Submodule [email protected] added at e2c57a
Loading

0 comments on commit 336b601

Please sign in to comment.