diff --git a/source/dub/internal/vibecompat/data/json.d b/source/dub/internal/vibecompat/data/json.d index 3671ddf..76f8860 100644 --- a/source/dub/internal/vibecompat/data/json.d +++ b/source/dub/internal/vibecompat/data/json.d @@ -1782,9 +1782,43 @@ static if (pretty) { import std.algorithm.sorting : sort; - string[] keyOrder; - foreach (string key, ref const Json e; json) keyOrder ~= key; - keyOrder.sort(); + enum keyOrder = [ + "name", + "description", + "homepage", + "authors", + "copyright", + "license", + "dependencies", + "systemDependencies", + "subPackages", + "configurations", + "buildTypes", + "-ddoxFilterArgs", + "targetType", + "targetName", + "targetPath", + "workingDirectory", + "subConfigurations", + "buildRequirements", + "buildOptions", + "libs", + "sourceFiles", + "sourcePaths", + "excludedSourceFiles", + "mainSourceFile", + "copyFiles", + "versions", + "debugVersions", + "importPaths", + "stringImportPaths", + "preGenerateCommands", + "postGenerateCommands", + "preBuildCommands", + "postBuildCommands", + "dflags", + "lflags" + ]; foreach( key; keyOrder ){ if( json[key].type == Json.Type.undefined ) continue;