From d804526d52e6caa3fbaf22ad043898174b0b25ae Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 4 Jan 2020 22:32:23 -0500 Subject: [PATCH] remove DumpMetadata option --- docs/release-notes.md | 1 + src/SMAPI/Framework/Models/ModFolderExport.cs | 21 ------------------- src/SMAPI/Framework/Models/SConfig.cs | 6 +----- src/SMAPI/Framework/SCore.cs | 14 ------------- src/SMAPI/SMAPI.config.json | 6 ------ 5 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 src/SMAPI/Framework/Models/ModFolderExport.cs diff --git a/docs/release-notes.md b/docs/release-notes.md index 464803b2..32082356 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -38,6 +38,7 @@ * Added direct `Console` access to paranoid mode warnings. * Improved error messages for `TargetParameterCountException` when using the reflection API. * `helper.Read/WriteSaveData` can now be used while a save is being loaded (e.g. within a `Specialized.LoadStageChanged` event). + * Removed `DumpMetadata` option. It was only meant for specific debugging cases, but players would occasionally enable it incorrectly and then report crashes. * Fixed private textures loaded from content packs not having their `Name` field set. * For SMAPI developers: diff --git a/src/SMAPI/Framework/Models/ModFolderExport.cs b/src/SMAPI/Framework/Models/ModFolderExport.cs deleted file mode 100644 index 3b8d451a..00000000 --- a/src/SMAPI/Framework/Models/ModFolderExport.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace StardewModdingAPI.Framework.Models -{ - /// Metadata exported to the mod folder. - internal class ModFolderExport - { - /// When the export was generated. - public string Exported { get; set; } - - /// The absolute path of the mod folder. - public string ModFolderPath { get; set; } - - /// The game version which last loaded the mods. - public string GameVersion { get; set; } - - /// The SMAPI version which last loaded the mods. - public string ApiVersion { get; set; } - - /// The detected mods. - public IModMetadata[] Mods { get; set; } - } -} diff --git a/src/SMAPI/Framework/Models/SConfig.cs b/src/SMAPI/Framework/Models/SConfig.cs index 53939f8c..b1612aa4 100644 --- a/src/SMAPI/Framework/Models/SConfig.cs +++ b/src/SMAPI/Framework/Models/SConfig.cs @@ -25,8 +25,7 @@ namespace StardewModdingAPI.Framework.Models [nameof(GitHubProjectName)] = "Pathoschild/SMAPI", [nameof(WebApiBaseUrl)] = "https://smapi.io/api/", [nameof(VerboseLogging)] = false, - [nameof(LogNetworkTraffic)] = false, - [nameof(DumpMetadata)] = false + [nameof(LogNetworkTraffic)] = false }; /// The default values for , to log changes if different. @@ -64,9 +63,6 @@ namespace StardewModdingAPI.Framework.Models /// Whether SMAPI should log network traffic. Best combined with , which includes network metadata. public bool LogNetworkTraffic { get; set; } - /// Whether to generate a file in the mods folder with detailed metadata about the detected mods. - public bool DumpMetadata { get; set; } - /// The colors to use for text written to the SMAPI console. public ColorSchemeConfig ConsoleColors { get; set; } diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 6e7c8fcb..dfd77e16 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -435,20 +435,6 @@ namespace StardewModdingAPI.Framework mods = resolver.ProcessDependencies(mods, modDatabase).ToArray(); this.LoadMods(mods, this.Toolkit.JsonHelper, this.ContentCore, modDatabase); - // write metadata file - if (this.Settings.DumpMetadata) - { - ModFolderExport export = new ModFolderExport - { - Exported = DateTime.UtcNow.ToString("O"), - ApiVersion = Constants.ApiVersion.ToString(), - GameVersion = Constants.GameVersion.ToString(), - ModFolderPath = this.ModsPath, - Mods = mods - }; - this.Toolkit.JsonHelper.WriteJsonFile(Path.Combine(Constants.LogDir, $"{Constants.LogNamePrefix}metadata-dump.json"), export); - } - // check for updates this.CheckForUpdatesAsync(mods); } diff --git a/src/SMAPI/SMAPI.config.json b/src/SMAPI/SMAPI.config.json index a7381b91..824bb783 100644 --- a/src/SMAPI/SMAPI.config.json +++ b/src/SMAPI/SMAPI.config.json @@ -59,12 +59,6 @@ The default values are mirrored in StardewModdingAPI.Framework.Models.SConfig to */ "LogNetworkTraffic": false, - /** - * Whether to generate a 'SMAPI-latest.metadata-dump.json' file in the logs folder with the full mod - * metadata for detected mods. This is only needed when troubleshooting some cases. - */ - "DumpMetadata": false, - /** * The colors to use for text written to the SMAPI console. *