I would like to contribute bug fixes and features to this Skript fork. Before I can do so, I need to be able to build Skript as-is from the latest commit. I seem to be unable to do so, as there are numerous compilation errors and the Maven file is confusing. I was unable to find building instructions.
mvn clean packageThis is how I attempted to build Skript from github using IntelliJ IDEA 14
git clone --depth 1 --branch master https://github.com/bensku/Skript.gitUse of base class' private field
protected insteadch\njol\skript\lang\SkriptParser.java L320, C50: Incompatible types: ch.njol.skript.lang.SyntaxElement cannot be converted to ch.njol.skript.lang.Expression<?> (screenshot)
ch\njol\skript\variables\Variables.java L86, C114: Incompatible types: ch.njol.skript.classes.ClassInfo<java.lang.Object> cannot be converted to ch.njol.skript.classes.ClassInfo<? extends org.bukkit.configuration.serialization.ConfigurationSerializable> (screenshot)mvn clean package doesn't build a usable jar (it doesn't appear to actually compile anything)
To make it easier for future contributors, the .idea, .settings and Skript.iml folders/files should be removed. These are IDE dependent and automatically generated. They should not be committed to version control, as the saved settings may conflict with different setups.
Instead of bundling WorldEdit and WorldGuard jars, they should be referred to in the POM using sk89q's repository
I also had the two compile errors under "Help needed" when attempting to build Skript from njol's original repository, many months ago. So I do not think these errors are introduced by this or Mirreski's fork
Huh, this is bad. Lot's of things to fix...
The reason why I have jars for several dependencies is simple: I got internal server error from Maven repositories. Maybe they're back up, haven't checked.
About empty jar file, I think I might know what is causing it. Njol has made Skript kinda reliant on Eclipse's compiler, i.e. "mvn compile" compiles nothing. I imagined that fix I merged here from @Gatt would have been worked, but it seems that it didn't.
Curious; how are you able to build Skript, yourself? Using Eclipse? Knowing that, I may be able to attempt to get building to work via Maven. I can also attempt the repository dependencies; I think some Maven servers unhelpfully report 500 (Internal Server Error) when it should be 404.
Thank you for the response
Eclipse automatically builds everything when you import Maven project or "Update Maven project". After that it compiles changed files when you save them. I don't really understand it well, but it is probably meant to be used for debugging in IDE.
If you could fix Maven compiler, it would be awesome. I'll try to help, but I have mostly used Gradle, this is my first project with Maven so...
Cool; I am the same. I started with Gradle (Forge modding) and was only introduced to Maven later.
Some questions that may help me here:
I use JDK 8 with Eclipse Mars.2. Note, though, that Eclipse compiler is not really dependant on JVM in any way.
Thank you; I didn't actually know Eclipse had its own compiler so I was confused by that. I've learnt a lot in the last few hours.
With what I have found:
I could try to fix the remaining compile error, or just leave it so Maven is not used as building and instead write instructions for each IDE on how to build a JAR.
It'd probably be easier just to leave it as-is. But for the future of Skript, I feel it'd be better to decouple it entirely from Eclipse and make it Maven buildable, so it can be built in Jenkins and developed in other IDEs without complicated instructions.
I'll keep trying, but would be curious to hear your thoughts on this.
For future, at least when I start planning Sponge support, I think I'm going to start using Gradle. Usually, if Maven can't do something, Gradle can :)
For now, if you can, I recommend using Eclipse, unless you're fine with those errors in editor. It would be great to have you helping me with Skript, I really can't do everything alone.
I usually hate "Bump" style comments on tickets, but I have found they can help shed some light on how the issue affects other people and the type of attention it needs. So here goes:
An issue was opened recently, (PaperMC/Paper#256, linked just above), with regards to Paper's handling of commands registered by Skript. After a bit of digging, I eventually found this was because of how Skript registers commands. The specific issue aside, this issue with Skript's workflow being non-trivial and my time being so limited, I ended up just dropping the notion to PR a fix entirely.
I don't claim to be the busiest person on Earth, but extra time is hard to come by for me, so any hurdle in building Skript beyond the non-trivial makes me drop any such notion immediately. So here I am "bumping" this issue, hoping that if nothing else it can help it get more attention from those with more time on their hands than I.
If I do happen across more free time I'd also be willing to assist in any way possible.
Thanks
Sorry for taking a while; I was finally able to figure out how to solve the build issues (albeit in ugly ways) and ended up making a large pull request, with a lot of changes.
Thoughts?
Great job :+1:
See the pull request, this would be hard task.
... and in case someone stumbles here, this was fixed in fall 2016. Currently it is very, very easy to build Skript :)
Most helpful comment
... and in case someone stumbles here, this was fixed in fall 2016. Currently it is very, very easy to build Skript :)