Southclaws / sampctl

The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
GNU General Public License v3.0
241 stars 33 forks source link

Duplicate includes issues found with some repos #441

Closed ADRFranklin closed 1 year ago

ADRFranklin commented 3 years ago

Due to the way sampctl handles downloading and extracting resources from releases, sometimes a release will contain the same include file as in the repository itself, this results in sampctl complaining of duplicate includes, because both the dependency path and the resources path both contain the same file.

To fix this we would need to figure out which path should be prioritised, meaning one of the paths would be dropped.

Southclaws commented 3 years ago

Note: if this check wasn't there, the pawn compiler would pick one and the user would not know which one (neither do I) so the sampctl check is there to prevent unexpected behaviour.

But yes, this should be fixed. If the resource contains a pawn include, that needs to be the one it chooses. The repository version may be a template or outdated. Plugin authors typically bundle all assets of the same version together.