Packages

Southclaws edited this page Apr 13, 2018 · 6 revisions

What is a "Package"?

Pawn Packages are similar in concept to the tools in other languages that allow users to distribute code as self-contained "boxes" of code, documentation, tests and other metadata:

  • NPM Packages
  • Ruby Gems
  • Python Packages
  • Perl Modules

All these tools make it extremely simple and quick to get code that someone else has written and use it in your own code. This is one thing that has been missing from the Pawn community until now.

What Does a Pawn Package Require?

At the most basic level, a GitHub repository with a .inc file in it is a Pawn Package.

However, if that repository contained code that required, for example, YSI to run properly - it would not work perfectly unless you manually included YSI - even if your code did not depend on YSI.

The other problem here is you don't know what other includes are required by a released piece of code without either:

  • reading the code
  • reading the documentation

And even then the author could forget or accidentally build their library against an ancient, outdated version of the include it requires.

To avoid situations like this, all Pawn repositories on GitHub should include a Package Definition File which would declare a list of "dependencies".

Examples

See the Examples page for some good habits to copy for Pawn Packages.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.