Comments (3)
Arrow Meta dropped support for generating source from typed quotes after deprecating the Proofs plugin that I linked before:
arrow-kt/arrow-meta#969
Thus, we should look into alternatives. The simple recommendation in KSP, although that still doesn't support in-place modification of source, nor first class IDE support. Both problems with the Arrow Meta implementation, so could be sufficient. We could always build a proper compiler plugin, but that has a bit more complexity and removes the benefits of KSP.
KSP will likely be the first path of investigation.
from hooks.
KSP seemed to be going well upon initial analysis. However, there seems to be an incompatibility with how we determine the type of the generated hook. We use the actual expression to determine to the types to pull out and combine with the context param:
KSP doesn't seem to support this claiming it is beyond their scope:
google/ksp#136 (comment)
I started thinking about ways to get around this:
- Do some reified type magic in DSL helper. I don't know if this is actually possible. Dynamically building a return type from input type parameter type parameters?
protected inline fun <reified R, reified FWithoutContext : Function<R>, FWithContext : Function<R>> syncHook2(): SyncHook<FWithContext> {
// pls ignore this
val fWithoutContext = FWithoutContext::class
val fWithoutContextType = typeOf<FWithoutContext>()
return syncHook(fWithoutContext)
}
- Instead of method helpers, try annotation helpers:
public abstract class Hooks : HooksDsl() {
@Sync<(newSpeed: Int) -> Unit>()
public abstract val accelerate: SyncHook<*>
}
(Which is what I ended up going with for now)
from hooks.
Closed with #24
from hooks.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hooks.