diff --git a/code/__DEFINES/spaceman_dmm.dm b/code/__DEFINES/spaceman_dmm.dm index b62bbee4259a..cabb02fd49c0 100644 --- a/code/__DEFINES/spaceman_dmm.dm +++ b/code/__DEFINES/spaceman_dmm.dm @@ -3,42 +3,72 @@ // The SPACEMAN_DMM define is set by the linter and other tooling when it runs. #ifdef SPACEMAN_DMM + /** + * Sets a return type expression for a proc. The return type can take the forms: + + * `/typepath` - a raw typepath. The return type of the proc is the type named. + + * `param` - a typepath given as a parameter, for procs which return an instance of the passed-in type. + + * `param.type` - the static type of a passed-in parameter, for procs which + * return their input or otherwise another value of the same type. + + * `param[_].type` - the static type of a passed-in parameter, with one level + * of `/list` stripped, for procs which select one item from a list. The `[_]` + * may be repeated to strip more levels of `/list`. + */ #define RETURN_TYPE(X) set SpacemanDMM_return_type = X + /** + * If set, will enable a diagnostic on children of the proc it is set on which do + * not contain any `..()` parent calls. This can help with finding situations + * where a signal or other important handling in the parent proc is being skipped. + * Child procs may set this setting to `0` instead to override the check. + */ #define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X - #define UNLINT(X) SpacemanDMM_unlint(X) + /** + * If set, raise a warning for any child procs that override this one, + * regardless of if it calls parent or not. + * This functions in a similar way to the `final` keyword in some languages. + * This cannot be disabled by child overrides. + */ #define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X + /** + * If set, raise a warning if the proc or one of the sub-procs it calls + * uses a blocking call, such as `sleep()` or `input()` without using `set waitfor = 0` + * This cannot be disabled by child overrides. + */ #define SHOULD_NOT_SLEEP(X) set SpacemanDMM_should_not_sleep = X + /** + * If set, ensure a proc is 'pure', such that it does not make any changes + * outside itself or output. This also checks to make sure anything using + * this proc doesn't invoke it without making use of the return value. + * This cannot be disabled by child overrides. + */ #define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X + ///Private procs can only be called by things of exactly the same type. #define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X + ///Protected procs can only be call by things of the same type *or subtypes*. #define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X + ///If set, will not lint. + #define UNLINT(X) SpacemanDMM_unlint(X) + + ///If set, overriding their value isn't permitted by types that inherit it. #define VAR_FINAL var/SpacemanDMM_final + ///Private vars can only be called by things of exactly the same type. #define VAR_PRIVATE var/SpacemanDMM_private + ///Protected vars can only be called by things of the same type *or subtypes*. #define VAR_PROTECTED var/SpacemanDMM_protected #else #define RETURN_TYPE(X) #define SHOULD_CALL_PARENT(X) - #define UNLINT(X) X #define SHOULD_NOT_OVERRIDE(X) #define SHOULD_NOT_SLEEP(X) #define SHOULD_BE_PURE(X) #define PRIVATE_PROC(X) #define PROTECTED_PROC(X) + #define UNLINT(X) X + #define VAR_FINAL var #define VAR_PRIVATE var #define VAR_PROTECTED var #endif - -/proc/auxtools_stack_trace(msg) - CRASH(msg) - -/proc/enable_debugging(mode, port) - CRASH("auxtools not loaded") - -/proc/auxtools_expr_stub() - CRASH("auxtools not loaded") - -/world/Del() - var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL") - if (debug_server) - LIBCALL(debug_server, "auxtools_shutdown")() - . = ..() diff --git a/code/__HELPERS/_auxtools_api.dm b/code/__HELPERS/_auxtools_api.dm new file mode 100644 index 000000000000..d0e840b7d802 --- /dev/null +++ b/code/__HELPERS/_auxtools_api.dm @@ -0,0 +1,8 @@ +/proc/auxtools_stack_trace(msg) + CRASH(msg) + +/proc/enable_debugging(mode, port) + CRASH("auxtools not loaded") + +/proc/auxtools_expr_stub() + CRASH("auxtools not loaded") diff --git a/code/__HELPERS/_extools_api.dm b/code/__HELPERS/_extools_api.dm deleted file mode 100644 index a8044c220331..000000000000 --- a/code/__HELPERS/_extools_api.dm +++ /dev/null @@ -1,5 +0,0 @@ -//#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined - -/proc/extools_log_write() - -/proc/extools_finalize_logging() diff --git a/dependencies.sh b/dependencies.sh index f22574cd216f..1e6b6de0fe91 100755 --- a/dependencies.sh +++ b/dependencies.sh @@ -8,7 +8,7 @@ export BYOND_MAJOR=515 export BYOND_MINOR=1619 #rust version -export RUST_VERSION=1.67.0 +export RUST_VERSION=1.73.0 #rust_g git tag export RUST_G_VERSION=3.0.0 @@ -27,4 +27,4 @@ export PYTHON_VERSION=3.7.9 export AUXMOS_REPO=https://github.com/Putnam3145/auxmos #auxmos version -export AUXMOS_VERSION=v2.2.1 +export AUXMOS_VERSION=master diff --git a/shiptest.dme b/shiptest.dme index 69e858afd265..3ea38c61d8ba 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -151,7 +151,6 @@ #include "code\__DEFINES\dcs\flags.dm" #include "code\__DEFINES\dcs\helpers.dm" #include "code\__DEFINES\dcs\signals.dm" -#include "code\__HELPERS\_extools_api.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_logging.dm" #include "code\__HELPERS\_string_lists.dm" diff --git a/tools/tgs_scripts/PreCompile.sh b/tools/tgs_scripts/PreCompile.sh index 6e34ab65af6a..eb45c8bf362b 100755 --- a/tools/tgs_scripts/PreCompile.sh +++ b/tools/tgs_scripts/PreCompile.sh @@ -53,7 +53,7 @@ cd .. echo "Deploying auxmos..." cd auxmos git checkout "$AUXMOS_VERSION" -env PKG_CONFIG_ALLOW_CROSS=1 RUSTFLAGS="-C target-cpu=native" ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features "all_reaction_hooks,katmos" -- -C target_cpu=native +env PKG_CONFIG_ALLOW_CROSS=1 RUSTFLAGS="-C target-cpu=native" ~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu --features "all_reaction_hooks,katmos" mv target/i686-unknown-linux-gnu/release/libauxmos.so "$1/libauxmos.so" cd ..