-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generator requires generator and template source #172
Comments
Yes, incremental Kotlin compilation in IDEA + checking time stamps was the only way to have a decent workflow while working on templates. The current scheme also uses the Kotlin sources to discover and run the template classes using reflection (using A few comments on your experiment:
|
(On a phone so quotes are hard)
As a side note it took me 1 1/2 days to do it but the current generator will compile and generate the sources in my experiment (not on github yet as I'm on a bus) but it does work. EDIT: code is now up on github |
@Spasi currently on my lwjgl3 fork there is a gradlebuild branch that is working with the current generator and can tell it to build or not to build parts though its still very simple. If you want to try it just open a command window and run the command |
Hey @ShadowLordAlpha, could you please rebase the gradlebuild branch on top of the current master and push it again? It's very hard to review your changes in the current state. Btw, generated sources are ignored in the main repository because tiny changes in the generator can produce massive diffs in the generated code. We do track progress though, in a separate repository, here. In other news, Kotlin 1.0.2-beta now supports incremental compilation in Gradle builds. |
Ya give me a bit to fully do it |
I know but they have to go somewhere.
decently sure that its 1.0.1-2 that supports it |
@Spasi ok the gradle-build branch should be what you want. To run it correctly open up a command window in the same folder and use the command Some notes
|
According to the Change Log, you'll need an 1.0.2 build.
OK, I see the new structure, but I don't know why it was necessary. The current structure was chosen to match Gradle/Maven conventions.
Compiling and running the generator is simple enough and I already have a gradle build that does that (locally, haven't pushed it on github anywhere). The issue I had was making Gradle behave like the current Ant build, where inactive bindings are not included in the source path at all. Your build doesn't do that either. It's probably not a big deal now with incremental compilation, but it'd be nice to have. Another thing I had done is use a master build.gradle under the root, then have a separate build.gradle for each module (under modules/core and modules/templates). Not sure if that made things unnecessarily complex and contributed to the trouble I had. |
oh ok ya that is 1.0.2 though i think i was getting that with 1.0.1-2 though i could be wrong
It technically wasn't needed however its the convention that gradle uses so you don't have to configure each plugin like the kotlin and java plugins though those two are not all that hard to compile and should make using some other plugins easier as no obscure configurations would be needed.
I can do that (I wrote this at 5 in the morning so I had to go to sleep) its set up so that it can be done. I just didn't do it. Anything else you need it to do that it currently does not do?
I find that doing that does makes things more complex as you have to keep track of the code in bunch of different places (I only ever use that for multiproject builds and even then I don't normally use it as if I keep everything in one file I can reuse a lot of variables most of the time). |
@Spasi done, inactive bindings should now be excluded from the generated code. This includes the kotlin files (both compiled and templates though this might need to be modified with a shift over to non-compiled templates) and core files. Be careful though as excluding some things may cause problems. Currently it should work based on the system arguments you gave generator before (they are in gradle.properties). It looks messy and can be cleaned up a lot though so its only showing how to do it really. |
So I was working on an experiment to try and get both #16 and #100 working but the generator needs its sources. I assume that this is for the time stamp of when the file was last changed so that it can skip extra work but is that all its for?
I'm asking because I have each binding split into different sub projects and the current system is designed so that everything is assumed to be in the same place.
The text was updated successfully, but these errors were encountered: