diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25f2cfd0..cde58b6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,9 @@ name: Gradle build -on: [ push ] +on: + push: + branches: [ dev, master ] + pull_request: jobs: build: @@ -8,20 +11,22 @@ jobs: matrix: os: [ macOS-latest, windows-latest ] runs-on: ${{matrix.os}} + timeout-minutes: 40 steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: DeLaGuardo/setup-graalvm@4.0 with: - java-version: 11 - - name: Add msys to path - if: matrix.os == 'windows-latest' - run: SETX PATH "%PATH%;C:\msys64\mingw64\bin" + graalvm: 21.2.0 + java: java11 + arch: amd64 - name: Cache gradle uses: actions/cache@v2 with: - path: ~/.gradle/caches + path: | + ~/.gradle/caches + ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} restore-keys: | ${{ runner.os }}-gradle- @@ -33,4 +38,4 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - name: Build - run: ./gradlew build --no-daemon --stacktrace + run: ./gradlew build --build-cache --no-daemon --stacktrace diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 74c1bffd..23ed5435 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,32 +2,27 @@ name: Dokka publication on: push: - branches: - - master + branches: [ master ] jobs: build: runs-on: ubuntu-20.04 + timeout-minutes: 40 steps: - - name: Checkout the repo - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - uses: actions/checkout@v2 + - uses: DeLaGuardo/setup-graalvm@4.0 with: - java-version: 11 - - name: Cache gradle - uses: actions/cache@v2 + graalvm: 21.2.0 + java: java11 + arch: amd64 + - uses: actions/cache@v2 with: path: ~/.gradle/caches - key: ubuntu-20.04-gradle-${{ hashFiles('*.gradle.kts') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} restore-keys: | - ubuntu-20.04-gradle- - - name: Build - run: | - ./gradlew dokkaHtmlMultiModule --no-daemon --no-parallel --stacktrace - mv build/dokka/htmlMultiModule/-modules.html build/dokka/htmlMultiModule/index.html - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@4.1.0 + ${{ runner.os }}-gradle- + - run: ./gradlew dokkaHtmlMultiModule --build-cache --no-daemon --no-parallel --stacktrace + - uses: JamesIves/github-pages-deploy-action@4.1.0 with: branch: gh-pages folder: build/dokka/htmlMultiModule diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 42fa6d3b..c5075cb0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,8 +3,7 @@ name: Gradle publish on: workflow_dispatch: release: - types: - - created + types: [ created ] jobs: publish: @@ -12,22 +11,23 @@ jobs: name: publish strategy: matrix: - os: [macOS-latest, windows-latest] + os: [ macOS-latest, windows-latest ] runs-on: ${{matrix.os}} steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: DeLaGuardo/setup-graalvm@4.0 with: - java-version: 11 - - name: Add msys to path - if: matrix.os == 'windows-latest' - run: SETX PATH "%PATH%;C:\msys64\mingw64\bin" + graalvm: 21.2.0 + java: java11 + arch: amd64 - name: Cache gradle uses: actions/cache@v2 with: - path: ~/.gradle/caches + path: | + ~/.gradle/caches + ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} restore-keys: | ${{ runner.os }}-gradle- @@ -40,20 +40,14 @@ jobs: ${{ runner.os }}-gradle- - name: Publish Windows Artifacts if: matrix.os == 'windows-latest' + shell: cmd run: > - ./gradlew release --no-daemon - -Ppublishing.enabled=true - -Ppublishing.github.user=${{ secrets.PUBLISHING_GITHUB_USER }} - -Ppublishing.github.token=${{ secrets.PUBLISHING_GITHUB_TOKEN }} - -Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }} - -Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }} + ./gradlew release --no-daemon --build-cache -Ppublishing.enabled=true + -Ppublishing.space.user=${{ secrets.SPACE_APP_ID }} + -Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }} - name: Publish Mac Artifacts if: matrix.os == 'macOS-latest' run: > - ./gradlew release --no-daemon - -Ppublishing.enabled=true - -Ppublishing.platform=macosX64 - -Ppublishing.github.user=${{ secrets.PUBLISHING_GITHUB_USER }} - -Ppublishing.github.token=${{ secrets.PUBLISHING_GITHUB_TOKEN }} - -Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }} - -Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }} + ./gradlew release --no-daemon --build-cache -Ppublishing.enabled=true -Ppublishing.platform=macosX64 + -Ppublishing.space.user=${{ secrets.SPACE_APP_ID }} + -Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b4b4990..3a874fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,31 @@ ### Fixed +### Security +## [0.5.0] +### Added +- Experimental `listOfSpec` delegate. + +### Changed +- **API breaking** Config is deprecated, use `ObservableMeta` instead. +- **API breaking** Descriptor no has a member property `defaultValue` instead of `defaultItem()` extension. It caches default value state on the first call. It is done because computing default on each call is too expensive. +- Kotlin 1.5.10 +- Build tools 0.10.0 +- Relaxed type restriction on `MetaConverter`. Now nullables are available. +- **Huge API-breaking refactoring of Meta**. Meta now can have both value and children. There is only one kind of descriptor now. +- **API breaking** `String.toName()` is replaced by `Name.parse()` +- **API breaking** Configurable`config` changed to `meta` + +### Removed +- `Config` +- Public PluginManager mutability +- Tables and tables-exposed moved to the separate project `tables.kt` +- BinaryMetaFormat. Use CBOR encoding instead + +### Fixed +- Proper json array index treatment. +- Proper json index for single-value array. + ### Security ## [0.4.0] ### Added diff --git a/README.md b/README.md index 1b559341..b6a8a566 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,6 @@ > **Maturity**: PROTOTYPE
P.property(property: KMutableProperty1
): Property P.property(property: KMutableProp
}
override fun onChange(owner: Any?, callback: (T?) -> Unit) {
- this@property.onChange(this) { name, oldItem, newItem ->
- if (name.startsWith(property.name.toName()) && oldItem != newItem) {
+ this@property.meta.onChange(this) { name ->
+ if (name.startsWith(Name.parse(property.name))) {
callback(property.get(this@property))
}
}
}
override fun removeChangeListener(owner: Any?) {
- this@property.removeListener(this@property)
+ this@property.meta.removeListener(this@property)
}
}
\ No newline at end of file
diff --git a/dataforge-context/src/commonMain/kotlin/space/kscience/dataforge/provider/Path.kt b/dataforge-context/src/commonMain/kotlin/space/kscience/dataforge/provider/Path.kt
index 2a16e53f..4d558179 100644
--- a/dataforge-context/src/commonMain/kotlin/space/kscience/dataforge/provider/Path.kt
+++ b/dataforge-context/src/commonMain/kotlin/space/kscience/dataforge/provider/Path.kt
@@ -16,7 +16,6 @@
package space.kscience.dataforge.provider
import space.kscience.dataforge.names.Name
-import space.kscience.dataforge.names.toName
import kotlin.jvm.JvmInline
/**
@@ -33,11 +32,7 @@ public value class Path(public val tokens: List S.property(property: KMutableProperty1): Property