Comments (5)
I can work on that if you want @krzema12
I have experience working with https://github.com/square/kotlinpoet
from github-workflows-kt.
@jmfayard That would be really cool, let's try that! I thought about kotlinpoet, but then I figured it will be simpler to generate the whole code by hand because I don't have experience with kotlinpoet. However, I'm open to checking how kotlinpoet will work for us.
So far I don't have much: https://github.com/krzema12/github-actions-kotlin-dsl/commits/generator .
Quickly describing my idea and plan:
- an independent Gradle module that handles wrappers code generation. Input for a single wrapper: actions's owner, name and version. Output: wrapper's code and target path
- have a central place with a list of wrappers that should be generated
- each wrapper should be customizable in terms of e.g. how a certain input should be modeled. Default is a string, but one could use various modes like "integer with special value" or "enumeration with custom value"
- generating the wrappers on demand, not during building the library. In the future, we can thought about making it more intelligent, e.g. (re)generating only these that need to be (re)generated
- best if generated code was kept in another source set, to distinguish it from the manually written code
- prior to generation, remove all generated code so that no leftover from previous generations is left
- have solid tests for different edge cases
I propose to implement and merge it often and in small pieces, so that if our ideas diverge, we can quickly sync and no large amount of work could be wasted in case of change of approach.
from github-workflows-kt.
I have a MVP here #75
from github-workflows-kt.
Nice milestone: all wrappers are now generated, there're no hand-crafted ones. What I plan to do still in this task:
- in PRs, regenerate all wrappers so that adding a new one is as easy as adding a line to
WrappersToGenerate
- add a wrapper for actions/setup-node@v2 that @jmfayard added in PR #75
from github-workflows-kt.
Nice!
from github-workflows-kt.
Related Issues (20)
- Allow generating bindings for more than one major version
- Add alternative simpler API for listing required actions
- Caching for Kotlin scripts is broken if using importing HOT 1
- Transitive imports don't work
- New major versions of actions available
- Prepare for Kotlin 2.0 HOT 3
- Too many separate workflows flood notification of contributors HOT 8
- Update name in Awesome Kotlin HOT 1
- New major versions of actions available HOT 1
- Cannot find new field in updated manifest HOT 2
- Fix caching of action manifest and typings HOT 2
- Add FAQ HOT 1
- New major versions of actions available
- Building with Dokka is broken with Gradle configuration cache
- New major versions of actions available
- Parallelize client-side binding generation
- Parallelize library-side binding generation
- [Bug] step-1 ("Execute script") of "Check YAML consistency" job is broken if generated from project root HOT 6
- Improve logging in action binding generator
- New major versions of actions available
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 github-workflows-kt.