Need to know the rules around dynamic code generators

Discussion in 'Bukkit Help' started by bergerkiller, Mar 19, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    bergerkiller

    I can remember from a while back that 'byte code generators' were not allowed according to the guidelines. Recently, this has mysteriously changed to 'it is not allowed to make decompiling your plugin harder'.

    Can a Bukkit moderator/staff/developer please explain when, and when not, your plugin is allowed to use byte code generators? I am talking about ASM and CGLib

    I have asked before on IRC, and the response was 'use it sparingly' and 'not recommended'. Right now, I have a real requirement to use this, to avoid a huge amount of duplicated code in BKCommonLib.

    I need to provide net.minecraft.server extension classes to inject an Entity Controller into the server. This is means to stabilize and fix support for TrainCarts. This is an example of such a class, but in-code. Instead of including around 80 NMS extension classes with the same repetitive code, I want to dynamically generate these classes instead. This also reduces the size of BKCommonLib.jar significantly.

    So really: Am I allowed to use this for this purpose? Are people allowed to use it at all? If yes, when can you and when not, if not, why are many people using it anyway and not getting confronted? Will your project no longer be permitted on dev-bukkit if you use it? Any guidelines that you have to state that your are using it?

    And yes, there are instances where ASM/CGLib is being used in plugins. Most of the time, this is in libraries, which BKC has in common.

    Please, no answer of 'please do not use it' - yes or no. Vague answers only contribute to lost work, and I don't want to write a complete generator to find out it's not allowed.

    tldr;
    • Want to use CGLib/ASM in BKCommonLib to get rid of bloated repetitive code
    • BKCommonLib has to be allowed on dev-bukkit
    • Is this possible/allowed?
     
  2. Offline

    bergerkiller

    *bump* (never knew this section of the forums was going this fast?)
     
  3. Offline

    bergerkiller

    Second and last bump, if no reply I am going to assume that it is allowed. Lenis is going to work on this if he has time for it, so tomorrow is too late.
     
Thread Status:
Not open for further replies.

Share This Page