π This release contains work from a new contributor! π
Thank you, null@brocollie08, for all your work!
BailHook default handler (#33)
Allows for SyncBailHook
to call with a default handler for when the taps do not bail and return nothing
- BailHook default handler #33 (@brocollie08)
- fix ci (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
make tap info mutable (#31)
Add data class
APIs to TapInfo
such that it can be mutated.
scope version properties to avoid conflicts (#30)
Scope metadata b/c it was conflicting w/ another Gradle plugin
- make tap info mutable #31 (@sugarmanz)
- scope version properties to avoid conflicts #30 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
New Hooks DSL (#29)
π₯ Breaking Change π₯
Relax typing specification when using the DSL. Hooks should always use the Hook
superclass as the specified type and rely solely on the annotation to specify the actual constraints of the hook:
abstract class CarHooks : Hooks() {
@Sync<() -> Unit>
abstract val brake: Hook
@Sync<(newSpeed: Int) -> Unit>
abstract val accelerate: Hook
}
- New Hooks DSL #29 (@stabbylambda)
- David Stone (@stabbylambda)
- Switch to KotlinPoet Code Generation #28 (@sugarmanz @stabbylambda)
- David Stone (@stabbylambda)
- Jeremiah Zucker (@sugarmanz)
Migrate from Arrow Meta to Kotlin Symbol Processor (#24)
π₯ This is a breaking change π₯
Migration to KSP from Arrow Meta because they dropped support for source generation. This does improve the overall maturity of the codegen module (compiler-plugin
-> processor
). However, the KSP framework doesn't support the code typing introspection that we were doing in Arrow Meta. Instead, we have to rely strictly on typings and annotations, which changes the DSL we originally had.
internal abstract class GenericHooks : Hooks() {
@Sync<(newSpeed: Int) -> Unit> abstract val sync: SyncHook<*>
@SyncBail<(Boolean) -> BailResult<Int>> abstract val syncBail: SyncBailHook<*, *>
@SyncLoop<(foo: Boolean) -> LoopResult> abstract val syncLoop: SyncLoopHook<*, *>
@SyncWaterfall<(name: String) -> String> abstract val syncWaterfall: SyncWaterfallHook<*, *>
@AsyncParallelBail<suspend (String) -> BailResult<String>> abstract val asyncParallelBail: AsyncParallelBailHook<*, *>
@AsyncParallel<suspend (String) -> Int> abstract val asyncParallel: AsyncParallelHook<*>
@AsyncSeries<suspend (String) -> Int> abstract val asyncSeries: AsyncSeriesHook<*>
@AsyncSeriesBail<suspend (String) -> BailResult<String>> abstract val asyncSeriesBail: AsyncSeriesBailHook<*, *>
@AsyncSeriesLoop<suspend (String) -> LoopResult> abstract val asyncSeriesLoop: AsyncSeriesLoopHook<*, *>
@AsyncSeriesWaterfall<suspend (String) -> String> abstract val asyncSeriesWaterfall: AsyncSeriesWaterfallHook<*, *>
}
- Migrate from Arrow Meta to Kotlin Symbol Processor #24 (@sugarmanz)
- forgot this for shot in the dark (@sugarmanz)
- more reversions (@sugarmanz)
- revert breaking build changes (@sugarmanz)
- shot in the dark (@sugarmanz)
- try to fix gradle crashing on release (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
Add explicit visibility to satisfy Kotlin explicit API check (#20)
Generated source code will adhere to Kotlin explicit API check if hooks are public
.
- Add explicit visibility to satisfy Kotlin explicit API check #20 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
Untap support & various fixes (#19)
- Fix Gradle generation params
- Modify async hook strategy to not take a scope, as this is already required to call the
suspend
method - Fix
AsyncParallelHook
to actually suspend properly until all callbacks complete - Replace mutable list containing
TapInfo
with a mutablevar
containing an immutable list (this fixes an issue when tapping a hook that is currently being called:ConcurrentModificationException
)
In order to allow calling sites to unregister stale callbacks and prevent memory leaks, the tap
API now returns a String
representing the ID of the specific "tap". The ID can then be passed into the new untap
API to remove the callback from the hook. This ID can be randomly generated or manually passed when tapping a hook. Manually passing an ID is useful for when the tapper wants to replace a stale callback without calling needing to untap
explicitly.
- Jeremiah Zucker (@sugarmanz)
Format generated source with KtLint (#18)
Format generated source with KtLint
To make generated source more readable for consumers
- Format generated source with KtLint #18 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
manually bump version snapshot (#17)
- manually bump version snapshot #17 (@sugarmanz)
- enhance class name and path generation strategy #17 (@sugarmanz)
- enhance hooks dsl detection and change example to use nested class #17 (@sugarmanz)
- use fully qualified path for superclass #17 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
upgrade to arrow 1.0.0 and fix generated sources root (#15)
- Upgrade to Arrow 1.0.0
- Fixed issue where JAR bundling was somehow causing the plugin options to be dropped
- upgrade to arrow 1.0.0 and fix generated sources root #15 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
- Upgrade to Kotlin 1.5 #13 (@stabbylambda)
- rename master to main ([email protected])
- Upgrade binary compatibility tool to 0.5.0 #14 ([email protected])
- Setup Auto for Canary and Next #12 ([email protected])
- David Stone (@stabbylambda)
- Jeremiah Zucker (@sugarmanz)
π This release contains work from a new contributor! π
Thank you, David Stone (@stabbylambda), for all your work!
Hooks with type parameters (#8)
Enhance DSL to adds the ability to generate Hooks with type parameters. The use case for this is when some piece of data is known only to the consumer of a library and the consumers of the taps, but not necessarily the library itself. As an example:
class FooHooks<T> : Hooks() {
open val beforeCalc = syncHook<(T) -> Unit>()
}
data class Foo<T>(val t: T) {
public val hooks = FooHooksImpl<T>()
fun calc() {
hooks.beforeCalc.call(t)
// ...
}
}
fun runCalcsWithLog() {
val f = Foo<String>("hi")
f.hooks.beforeCalc.tap("hi") { x -> println(x) }
}
- Hooks with type parameters #8 (@stabbylambda)
- Update to use Typed Quotes #7 (@stabbylambda)
- update docs for gradle plugin portal #6 (@sugarmanz)
- David Stone (@stabbylambda)
- Jeremiah Zucker (@sugarmanz)
- Publish to Gradle Plugin Portal #5 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
- Fix orchid deploy (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
- Finalize publishing and fix links #4 (@sugarmanz)
- Jeremiah Zucker (@sugarmanz)
π This release contains work from new contributors! π
Thanks for all your work!
β€οΈ Jeremiah Zucker (@sugarmanz)
β€οΈ Andrew Lisowski (@hipstersmoothie)
- test signing first #3 (@sugarmanz)
- Configure CI #2 (@sugarmanz)
- migrate links #1 (@sugarmanz)
- don't do other publishing yet (@sugarmanz)
- prepare 0.7.3-SNAPSHOT (@sugarmanz)
- version 0.7.2-SNAPSHOT (@sugarmanz)
- specify subproj (@sugarmanz)
- move auto download (@sugarmanz)
- initialize public repo (@hipstersmoothie)
- Andrew Lisowski (@hipstersmoothie)
- Jeremiah Zucker (@sugarmanz)
From #38
- Configure KtLint Gradle Plugin
- Enable explicit API mode
- Setup API matching tool
- Generate Dokka API docs
- Migrate to Gradle Kotlin DSL
- Jeremiah Zucker (@JZUCKER)
From #36
Implement Kotlin Maven Plugin Extension
- Jeremiah Zucker (@JZUCKER)
- Jeremiah Zucker (@JZUCKER)
From #31
Implement Gradle plugin for the compiler plugin. When added to a project, it will automatically include the correct dependencies.
Remove all tapable
references from the package name.
From #33
- David Stone (@dstone3)
- Jeremiah Zucker (@JZUCKER)
- David Stone (@dstone3)
- David Stone (@dstone3)
- David Stone (@dstone3)
- Jeremiah Zucker (@JZUCKER)
From #7
First published alpha release of Intuit Tapable for the JVM. This includes the complete set of working hooks, as well as a compiler plugin to help generate specific hook implementations. This project as a whole is based on Webpack's Tapable for JS.
- Initial build & release #7 (@JZUCKER)
- Fix the suspend function and add back the convenience tap #6 (@dstone3)
- Implement the compiler plugin #5 (@JZUCKER @dstone3)
- Add Async Parallel and Bail #4 (@dstone3)
- Some cleanup #3 (@dstone3)
- Sync Hooks + Interceptors #2 (@dstone3)
- Basic sync hook #1 (@dstone3 @JZUCKER)