Code Monkey home page Code Monkey logo

Comments (2)

Janrupf avatar Janrupf commented on May 28, 2024

Please consider implementing at least a basic support for unloading - it doesn't have to be functional yet, but just be there so it can get implemented eventually.

from flintmc.

zortax avatar zortax commented on May 28, 2024

unloading is pretty much impossible to implement for packages that use class transformations or anything alike. To properly implement unloading for the other APIs, significant changes in the Service API would be necessary. Proposed architecture would be to differ between ServiceHandler and UnloadableServiceHandler which would then also implement a method to unload a discovered annotation; I could then automatically blacklist packages with one or more annotation discovered by a not unloadable service handler from being unloaded, though this would make it incredibly nontransparent for package authors wether their package is gonna be unloadable. And even if a package should be unloadable by itself, the unloading could be blocked as it could potentially break the dependency graph. The problem gets even more complicated when considering that packages can contain service handlers as well.

So unloading is

  • difficult to implement for packages that only depend on the minecraft API
  • even more difficult for packages that use class transformation APIs
  • pretty much impossible to implement for packages using javassist/ow2 ASM (unless we use instrumentation/hotswapping which I wouldn't)
  • nontransparent and difficult to understand for package authors and users

That's why I personally would not implement unloading at all and I am certainly not gonna do it right now.
We can however talk about a "disabling" API, which optionally allows packages to be disabled. The package won't be unloaded, event listeners etc. would still be registered, the responsibility would be with the package author to just "disable" all package logic. The package author could then decide whether it can be disabled by the user.

from flintmc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.