Giter Site home page Giter Site logo

poggit / devirion Goto Github PK

View Code? Open in Web Editor NEW
45.0 12.0 15.0 58 KB

Plugin used for debugging virions or plugins that use virions.

License: Apache License 2.0

PHP 100.00%
pocketmine-plugins pocketmine poggit poggit-virions php dependency-manager

devirion's Introduction

DEVirion

DEVirion is the virion dependency manager. It can be used to run plugins from source if they require virions.

  1. Install this plugin
  2. Create a directory called virions next to the plugins folder (not inside it!)
  3. Drop the virions you use into the virions folder. Both packaged (.phar) virions and source (folder) virions are acceptable. (Just like how you install plugins with DevTools)

Notes

  • DEVirion will not shade plugins. Hence, this plugin must only be used for virion/plugin development. Released plugins must not depend on DEVirion to load virions.
  • DEVirion cannot automatically detect what virions are needed. Use the CLI to automatically download virions required for a certain project.

Command Line Options (for PocketMine)

You may also use the command-line option --load-virions to specify an additional folder to scan virions from (similar to the plugin path), or --load-virion (singular) to explicitly load a folder virion at the specified path (does not work with phar virions). For example, if you have this folder structure:

/
/server/
/server/PocketMine-MP.phar
/server/start.sh
/server/virions/
/server/virions/libweird.phar
/server/virions/libstrange/ (with a virion.yml in this folder)
/libs/
/libs/libodd.phar
/libs/librare/ (with a virion.yml in this folder)
/misc/
/misc/libnormal.phar
/misc/libtrivial/ (with a virion.yml in this folder)

Running ./start.sh in /server/ will automatically load libweird and libstrange.

Running ./start.sh --load-virions=/libs/ will additionally load libodd and librare

Running ./start.sh --load-virion=/misc/libtrivial/ will additionally load libtrivial.

Running ./start.sh --load-virion=/misc/libnormal.phar will not load libnormal, because --load-virion does not support phar virions โ€” it's usually not necessary, and you should copy it to virions folder instead.

Command Line Interface (Standalone executable)

Usage

=== DEVirion.phar usage ===
php /path/to/DEVirion.phar install <manifest> <project> <folder> [--replace]
    - Downloads all virions required by a project
    - <manifest> is the path to the .poggit.yml of the project. You may put an
      URLs here.
    - <project> is the case-insensitive name of the project.
    - <folder> is the path to the folder that virions should be installed in.
      This should be /path/to/your_server/virions
    - --replace will cause DEVirion to overwrite existing virions with the same
      name DEVirion uses ({VirionName}_v{MajorVersion}.phar)

php /path/to/DEVirion.phar download <owner> <repo> <project> <version> [--branch=":default"] [--output="/path/to/output.phar"]
    - Downloads a virion build from Poggit
    - <owner>, <repo> and <project> are the case-insensitive names of the repo
      owner, repo and project containing the virion. <project> can be ~ if same
      as <repo>.
    - <version> is the SemVer version constraint for the virion required.
      Same as the version field in .poggit.yml
    - Only builds from the --branch branch will be used. ":default" means the
      current default branch of the repo. --branch or --branch=* will accept
      all branches.
    - If --output is provided, the virion will be downloaded to there.
      Otherwise, it is downloaded to <project>.phar (or "<project>_(n).phar" if
      exists). --output without a value will echo the file contents to stderr.
      (There is no option to echo to stdout because stdout is used for showing
      verbose information)

Requirements

To run the CLI,

  • PHP 7.0 or above is required
  • The OpenSSL extension must be present to provide the https:// wrapper (cURL is not required)
  • The YAML extension is required.
  • (Will be fixed soon) The production phar may not contain the shebang line #!/usr/bin/env php in the stub, so directly executing devirion.phar blah blah blah may not work.

devirion's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devirion's Issues

it has aproblem

[09:37:58] [Server thread/WARNING]: [DEVirion] Virions should be bundled into plugins, not redistributed separately! Do NOT use DEVirion on production servers!!

Memory Issue

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 7381522038851265936 bytes) in /home/servers/opfaction/plugins/devirion-master/src/poggit/virion/devirion/RegisterClassLoaderAsyncTask.php on line 36

Does anyone know what causes this?

Error when running cli.php - curly braces

php vendor/DEVirion.phar install .poggit.yml MagicWE2 vendor

PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in phar:///home/runner/work/MagicWE2/MagicWE2/vendor/DEVirion.phar/cli.php on line 101
PHP Stack trace:
PHP   1. {main}() /home/runner/work/MagicWE2/MagicWE2/vendor/DEVirion.phar:0

branch: 4.0

Error

I got this error on startup.

05.08 07:00:42 [Server] Server thread/CRITICAL TypeError: "file_exists() expects parameter 1 to be a valid path, string given" (EXCEPTION) in "devirion-master/src/poggit/virion/devirion/VirionClassLoader" at line 65
05.08 07:00:42 [Server] Server thread/DEBUG #0 devirion-master/src/poggit/virion/devirion/VirionClassLoader(65): file_exists(string P...............ey : %MONETARY_U/muqsit/invmenu/InvMenuHandler__64bit.php)
05.08 07:00:42 [Server] Server thread/DEBUG #1 vendor/pocketmine/spl/BaseClassLoader(124): poggit\virion\devirion\VirionClassLoader->findClass(string muqsit\invmenu\InvMenuHandler)
05.08 07:00:42 [Server] Server thread/DEBUG #2 devirion-master/src/poggit/virion/devirion/VirionClassLoader(89): BaseClassLoader->loadClass(string muqsit\invmenu\InvMenuHandler)
05.08 07:00:42 [Server] Server thread/DEBUG #3 (): poggit\virion\devirion\VirionClassLoader->loadClass(string muqsit\invmenu\InvMenuHandler)
05.08 07:00:42 [Server] Server thread/DEBUG #4 Anvils/src/Anvils/Main(49): spl_autoload_call(string muqsit\invmenu\InvMenuHandler)
05.08 07:00:42 [Server] Server thread/DEBUG #5 src/pocketmine/plugin/PluginBase(102): Anvils\Main->onEnable()
05.08 07:00:42 [Server] Server thread/DEBUG #6 src/pocketmine/plugin/PluginManager(614): pocketmine\plugin\PluginBase->setEnabled(boolean 1)
05.08 07:00:42 [Server] Server thread/DEBUG #7 src/pocketmine/Server(1931): pocketmine\plugin\PluginManager->enablePlugin(Anvils\Main object)
05.08 07:00:42 [Server] Server thread/DEBUG #8 src/pocketmine/Server(1917): pocketmine\Server->enablePlugin(Anvils\Main object)
05.08 07:00:42 [Server] Server thread/DEBUG #9 src/pocketmine/Server(1711): pocketmine\Server->enablePlugins(integer 1)
05.08 07:00:42 [Server] Server thread/DEBUG #10 src/pocketmine/PocketMine(237): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /, string /plugins/)
05.08 07:00:42 [Server] Server thread/DEBUG #11 /custom.phar(1): require(string phar:///custom.phar/src/pocketmine/PocketMine.php)

Fatal Error [4.0]

Pocketmine-Version: pocketmine/pocketmine-mp:4.0.0-BETA9, pocketmine/pocketmine-mp:4.0.0-BETA10

Fatal error: Declaration of poggit\virion\devirion\VirionClassLoader::loadClass($name): ?bool must be compatible with
BaseClassLoader::loadClass(string $name): bool in C:\xampp\home\servers\Server-2\plugins\devirion\src\poggit\virion\devirion\VirionClassLoader.php on line 86

ClassLoader dependency has been updated to pocketmine/classloader v0.2.0

error while loading

pmmp api3alpha9

[11:56:29] [Server thread/CRITICAL]: ErrorException: "mkdir(): Invalid argument" (EXCEPTION) in "DEVirion.phar/src/poggit/virion/devirion/DEVirion" at line 42
[11:56:29] [Server thread/DEBUG]: #0 (): pocketmine\error_handler(integer 2, string mkdir(): Invalid argument, string phar:///home/test/plugins/DEVirion.phar/src/poggit/virion/devirion/DEVirion.php, integer 42, array Array())
[11:56:29] [Server thread/DEBUG]: #1 DEVirion.phar/src/poggit/virion/devirion/DEVirion(42): mkdir(string )
[11:56:29] [Server thread/DEBUG]: #2 src/pocketmine/plugin/PharPluginLoader(112): poggit\virion\devirion\DEVirion->onLoad()
[11:56:29] [Server thread/DEBUG]: #3 src/pocketmine/plugin/PharPluginLoader(65): pocketmine\plugin\PharPluginLoader->initPlugin(poggit\virion\devirion\DEVirion object, pocketmine\plugin\PluginDescription object, string /home/test/plugins/DEVirion, string phar:///home/test/plugins/DEVirion.phar)
[11:56:29] [Server thread/DEBUG]: #4 src/pocketmine/plugin/PluginManager(161): pocketmine\plugin\PharPluginLoader->loadPlugin(string phar:///home/test/plugins/DEVirion.phar)
[11:56:29] [Server thread/DEBUG]: #5 src/pocketmine/plugin/PluginManager(305): pocketmine\plugin\PluginManager->loadPlugin(string /home/test/plugins/DEVirion.phar, array Array())
[11:56:29] [Server thread/DEBUG]: #6 src/pocketmine/Server(1635): pocketmine\plugin\PluginManager->loadPlugins(string /home/test/plugins/)
[11:56:29] [Server thread/DEBUG]: #7 src/pocketmine/PocketMine(556): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/test/PocketMine-MP.phar/, string /home/test/, string /home/test/plugins/)
[11:56:29] [Server thread/DEBUG]: #8 /home/test/PocketMine-MP.phar(1): require(string phar:///home/test/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Installation

Plugin startup fails with Error: "Call to a member function getKnownAntigens() on null" (EXCEPTION) in "/plugins/devirion/src/poggit/virion/devirion/DEVirion" at line 50 unless the 'virions' folder is created manually first.

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.