alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
965 stars 421 forks source link

Integrate spcomp into Sourcemod system? #746

Open assyrianic opened 6 years ago

assyrianic commented 6 years ago

Title is self explanatory, integrate the sourcepawn compiler into Sourcemod.

This is likely already planned but just putting an issue just in case. The Pros to integrating the compiler would be...

  1. Development Speed - plugins don't need to be precompiled to run, just drag and drop .sp files into a specific folder and the .sp files will be compiled ad-hoc.
  2. Ability to Export Types - custom types from C/C++ can be exported directly thanks to being able to directly modify spcomp's symbol tables.

The Cons to integrating the compiler are...

  1. Some people might prefer precompiling (for catching errors earlier) which could possibly mean maintaining a separate and integrated versions of spcomp.
  2. IF two separate compilers are maintained, exported types would be unknown since the separate compiler's spcomp doesn't have a modified symbol table. Solution could be to save data in different ways, invoke the integrated spcomp from sourcemod, or just use the status quo through .inc files though that would cancel out the 2nd Pro.
WildCard65 commented 6 years ago

If this idea is ever implemented (that's a big IF), both cons can be neutralized with an intricate API built into the compiler's code (would also probably require spcomp being turned into a combination of EXE and DLL

hydrogen-mvm commented 5 years ago

I know I'm necro'ing this but I figure it's relevant to this issue:

https://forums.alliedmods.net/showthread.php?p=1588211#post1588211 https://forums.alliedmods.net/showthread.php?t=170898&page=3 https://forums.alliedmods.net/showthread.php?p=1591006#post1591006 https://forums.alliedmods.net/showthread.php?p=1590729#post1590729 https://forums.alliedmods.net/showthread.php?p=1609468#post1609468 https://forums.alliedmods.net/showthread.php?p=1613213#post1613213 (4 posts)

asherkin commented 5 years ago

@hydrogen-mvm You're linking posts from SM core team members, we know what we wrote, is there something you were trying to add?

dvander commented 5 years ago

Server-side compilation isn't a big project. Someone just needs to decide how plugins would be packaged and SourcePawn could provide the API.

hydrogen-mvm commented 5 years ago

@asherkin No I wasn't trying to add anything, just linking some background information related to this thread that future interested readers can look at. Apologies if I caused any inconvenience. Cheers!