Skip to content

Commit

Permalink
copyright bump and deprecations bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 2, 2024
1 parent 8e03369 commit 2b819ef
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 34 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019-2023 The Denizen Script Team
Copyright (c) 2019-2024 The Denizen Script Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -29,7 +29,7 @@ Copyright (C) 2014-2019 The Denizen Script Team, All Rights Reserved.

The MIT License (MIT)

Copyright (c) 2019-2023 The Denizen Script Team
Copyright (c) 2019-2024 The Denizen Script Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Expand Up @@ -6,7 +6,6 @@
import com.denizenscript.denizencore.tags.ObjectTagProcessor;
import com.denizenscript.denizencore.utilities.CoreConfiguration;
import com.denizenscript.denizencore.utilities.Deprecations;
import com.denizenscript.denizencore.utilities.debugging.SlowWarning;
import com.denizenscript.denizencore.utilities.debugging.Warning;

import java.util.Collection;
Expand Down Expand Up @@ -191,7 +190,7 @@ public TimeTag doFlagExpirationTag(Attribute attribute) {
return result;
}

public static Warning listFlagsTagWarning = new SlowWarning("listFlagsTagWarning", "The list_flags and flag_map tags are meant for testing/debugging only. Do not use it in scripts (ignore this warning if using for testing reasons).");
public static Warning listFlagsTagWarning = new Warning("listFlagsTagWarning", "The list_flags and flag_map tags are meant for testing/debugging only. Do not use it in scripts (ignore this warning if using for testing reasons).");

public ListTag doListFlagsTag(Attribute attribute) {
if (attribute.getScriptEntry() != null && attribute.getScriptEntry().getScript() != null) { // don't warn in '/ex'
Expand Down
Expand Up @@ -35,21 +35,45 @@ public class Deprecations {

// Added 2020/03/14
// 2022-year-end commonality: #12
// 2023-year-end commonality: #18
public static Warning oldStyleRandomCommand = new StrongWarning("oldStyleRandomCommand", "Using the 'random' command with an argument number is deprecated: use the modern colon syntax instead (refer to documentation).");

// Added 2021/04/16, made strong 2022/03/19.
// Valid candidate for functionality remove with a 'past deprecations' backup warning - has been deprecated for a while, and is a trivial update to apply
// 2022-year-end commonality: #34
// 2023-year-end commonality: #21
public static Warning ymlFileExtension = new StrongWarning("ymlFileExtension", "Denizen scripts use the '.dsc' file extension, not '.yml'. Please follow the Denizen beginner's guide https://guide.denizenscript.com/ - if you need help, ask in the official Denizen Discord @ https://discord.gg/Q6pZGSR");

// Added 2020/06/13, made strong 2022/12/31.
public static Warning scriptConstantTag = new Warning("scriptConstantTag", "The script.constant system has been deprecated in favor of just using data_key.");
public static Warning scriptConstantTag = new StrongWarning("scriptConstantTag", "The script.constant system has been deprecated in favor of just using data_key.");

// Added 2021/02/17, made normal 2022/12/31, made strong 2024/01/02.
public static Warning listEscapeContents = new StrongWarning("listEscapeContents", "The tags ListTag.escape_contents and unescape_contents are deprecated: use parse[escaped] and parse[unescaped], or just don't escape in the first place as most list escapes are no longer needed.");

// ==================== Normal deprecations ====================
// These show up every time, and should get the server owner's attention quickly if they check their logs.

// Added 2021/02/17, made normal 2022/12/31.
public static Warning listEscapeContents = new Warning("listEscapeContents", "The tags ListTag.escape_contents and unescape_contents are deprecated: use parse[escaped] and parse[unescaped], or just don't escape in the first place as most list escapes are no longer needed.");
// Added 2020/05/29, made slow 2022/12/31, made normal 2024/01/02.
public static Warning listOldMapTags = new Warning("listOldMapTags", "Old list.map_* tags are deprecated: use the modern MapTag options instead.");

// Added 2020/06/13, made slow 2022/12/31, made normal 2024/01/02.
public static Warning yamlDataContainer = new Warning("yamlDataContainer", "'yaml data' containers are now just called 'data' containers.");

// Added 2021/10/17, made slow 2022/12/31, made normal 2024/01/02.
public static Warning queueExists = new Warning("queueExists", "'queue.exists[...]' tag is deprecated in favor of queue[...].exists");
public static Warning queueStats = new Warning("queueStats", "'queue.stats' tag is deprecated in favor of 'util.event_stats', and 'queue.list' is deprecated in favor of 'util.queues'");

// Added 2020/05/24, made slow 2022/12/31, made normal 2024/01/02.
private static final String pointlessSubtagPrefix = "Most pointless sub-tags are deprecated in favor of explicit unique tags. ";
public static Warning flagIsExpiredTag = new Warning("flagIsExpiredTag", pointlessSubtagPrefix + "'flag[...].is_expired' is deprecated: use 'has_flag[...]' instead.");
public static Warning flagExpirationTag = new Warning("flagExpirationTag", pointlessSubtagPrefix + "'flag[...].expiration' is deprecated: use 'flag_expiration[...]' instead.");

// Added 2020/12/14, but deprecated unofficially earlier, made slow 2022/12/31, made normal 2024/01/02.
// 2023-year-end commonality: #25
public static Warning queueClear = new Warning("queueClear", "Usage of 'queue clear' or 'queue stop' to stop the current queue is deprecated: use the 'stop' command.");

// Added 2021/10/28, made slow 2022/12/31, made normal 2024/01/02.
public static Warning dynamicPrefix = new Warning("dynamicPrefix", "Dynamically prefixed arguments (for 'prefix:value' arguments, like '<[sometag]>:<[somevalue]>') were never officially permitted and are now deprecated. You must specify a prefix explicitly if one is needed.");

// ==================== SLOW deprecations ====================
// These aren't spammed, but will show up repeatedly until fixed. Server owners will probably notice them.
Expand All @@ -60,62 +84,48 @@ public class Deprecations {

// Added 2020/05/23, made slow 2022/12/31.
// 2022-year-end commonality: #21
// 2023-year-end commonality: #15
public static Warning timeTagRewrite = new SlowWarning("timeTagRewrite", "Using old Duration-Time - TimeTag is now separate from DurationTag, and some tags have changed as a result.");

// Added 2020/05/29, made slow 2022/12/31.
public static Warning listOldMapTags = new SlowWarning("listOldMapTags", "Old list.map_* tags are deprecated: use the modern MapTag options instead.");

// Added 2020/06/13, made slow 2022/12/31.
public static Warning yamlDataContainer = new SlowWarning("yamlDataContainer", "'yaml data' containers are now just called 'data' containers.");

// Added 2021/10/17, made slow 2022/12/31.
public static Warning queueExists = new SlowWarning("queueExists", "'queue.exists[...]' tag is deprecated in favor of queue[...].exists");
public static Warning queueStats = new SlowWarning("queueStats", "'queue.stats' tag is deprecated in favor of 'util.event_stats', and 'queue.list' is deprecated in favor of 'util.queues'");

// Added 2021/10/28, made slow 2022/12/31.
public static Warning dynamicPrefix = new SlowWarning("dynamicPrefix", "Dynamically prefixed arguments (for 'prefix:value' arguments, like '<[sometag]>:<[somevalue]>') were never officially permitted and are now deprecated. You must specify a prefix explicitly if one is needed.");

// Added 2020/05/24, made slow 2022/12/31.
private static String pointlessSubtagPrefix = "Most pointless sub-tags are deprecated in favor of explicit unique tags. ";
public static Warning flagIsExpiredTag = new SlowWarning("flagIsExpiredTag", pointlessSubtagPrefix + "'flag[...].is_expired' is deprecated: use 'has_flag[...]' instead.");
public static Warning flagExpirationTag = new SlowWarning("flagExpirationTag", pointlessSubtagPrefix + "'flag[...].expiration' is deprecated: use 'flag_expiration[...]' instead.");

// Added 2020/12/14, but deprecated unofficially earlier, made slow 2022/12/31.
public static Warning queueClear = new SlowWarning("queueClear", "Usage of 'queue clear' or 'queue stop' to stop the current queue is deprecated: use the 'stop' command.");

// ==================== VERY SLOW deprecations ====================
// These are only shown minimally, so server owners are aware of them but not bugged by them. Only servers with active scripters (using 'ex reload') will see them often.

// Added 2022/08/23, bump forward rapidly to enable spread of autoExecute.
// 2022-year-end commonality: #24
// 2023-year-end commonality: #6
public static Warning outOfOrderArgs = new VerySlowWarning("outOfOrderArgs", "Command has out-of-order linear arguments. This can only be interpreted by the legacy parser, and will not be understood by the modern parser. Please make sure your command's linear arguments match the documented order.");

// Added 2021/04/14, made very-slow 2022/12/31.
// 2022-year-end commonality: #4
// 2023-year-end commonality: #9
public static Warning locallyArgument = new VerySlowWarning("locallyArgument", "The 'locally' argument in run/inject is deprecated: just specify the script name, or <script>.");

// Added 2021/12/08, made very-slow 2022/12/31.
// 2022-year-end commonality: #30
public static Warning oldUtilRandomTags = new VerySlowWarning("oldUtilRandomTags", "Several 'util.random.xxx' are deprecated in favor of 'util.random_xxx' (the same tag, but '_' instead of a '.', for format standardization reasons)");

// Added 2022/04/11, made very-slow 2024/01/02.
public static Warning prebinaryTags = new VerySlowWarning("prebinaryTags", "Tags and tools related to binary processing that predate the BinaryTag feature are deprecated in favor of using BinaryTag. This includes 'ElementTag.base64_encode/decode', 'hex_encode/decode', ... refer to meta-docs for specifics");

// Added 2022/12/05, relevant years earlier, made very-slow 2024/01/02.
// 2023-year-end commonality: #12
public static Warning intTagVariants = new VerySlowWarning("intTagVariants", "Several of the _int math tag variants (excluding 'div_int') don't actually have any benefit over the non-_int forms and haven't for many years now.");

// ==================== FUTURE deprecations ====================

// Added 2021/02/04, deprecate officially by 2024.
// 2022-year-end commonality: #9
// 2023-year-end commonality: #20
public static Warning splitNewDataAction = new FutureWarning("splitNewDataAction", "The 'split to new list' data action ('key:!|:value') is deprecated: this no longer has a purpose, as you can instead just set to the list.");

// Added 2022/03/30, deprecate officially by 2024.
// 2022-year-end commonality: #32
// 2023-year-end commonality: #7
public static Warning oldNonSecretTagPassword = new FutureWarning("oldNonSecretTagPassword", "Passwords and tokens used to be sent through tags or passwordfiles, it is now recommended instead that you use the 'secrets.secret' file with SecretTag. This includes the 'SQL connect' command.");

// Added 2022/04/11, deprecate officially by 2024.
public static Warning prebinaryTags = new FutureWarning("prebinaryTags", "Tags and tools related to binary processing that predate the BinaryTag feature are deprecated in favor of using BinaryTag. This includes 'ElementTag.base64_encode/decode', 'hex_encode/decode', ... refer to meta-docs for specifics");

// Added 2022/12/05, relevant years earlier, deprecate officially by 2024.
public static Warning intTagVariants = new FutureWarning("intTagVariants", "Several of the _int math tag variants (excluding 'div_int') don't actually have any benefit over the non-_int forms and haven't for many years now.");

// Added 2022/08/21, deprecate officially by 2025.
// 2022-year-end commonality: #1
// 2023-year-end commonality: #1
public static Warning asXTags = new FutureWarning("asXTags", "Tags of the form 'as_x' where 'x' is a type, such as 'as_list', are deprecated in favor of the tag ObjectTag.as[<type>], used like 'as[list]'.");

// ==================== PAST deprecations of things that are already gone but still have a warning left behind ====================
Expand Down

0 comments on commit 2b819ef

Please sign in to comment.