diff --git a/Docs/SML.md b/Docs/SML.md index dec90aee2..62cc29174 100644 --- a/Docs/SML.md +++ b/Docs/SML.md @@ -6,16 +6,16 @@ In SML newline characters (`\r\n`) and comma (`,`) characters can be used interc ## Example.sml ```sml # Here is a comment -KeyName: "A String Value" -"KeyWithSpecial#@": 1234 +KeyName: 'A String Value' +'KeyWithSpecial#@': 1234 IsEnabled: true AnArray: [ - "Main.cpp" + 'Main.cpp' 1234 ] Table1: { - ChildArray: [ "value1", "value2" ] + ChildArray: [ 'value1', 'value2' ] } ``` @@ -71,6 +71,6 @@ COMMENT : '#'.*?'\r'?'\n' -> channel(HIDDEN) ; INTEGER : DIGIT+ ; KEY_LITERAL : [\p{L}\p{N}]+ ; WORD : (LOWERCASE | UPPERCASE)+ ; -STRING_LITERAL : '"' BASIC_CHAR*? '"' ; +STRING_LITERAL : '\'' BASIC_CHAR*? '\'' ; WHITESPACE : (' '|'\t')+ -> channel(HIDDEN) ; ``` \ No newline at end of file diff --git a/RootRecipe.sml b/RootRecipe.sml index 7764512db..9b31eaba6 100644 --- a/RootRecipe.sml +++ b/RootRecipe.sml @@ -1 +1 @@ -OutputRoot: "out/" +OutputRoot: 'out/' diff --git a/Samples/C/BuildExtension/Extension/PackageLock.sml b/Samples/C/BuildExtension/Extension/PackageLock.sml index 92bcb4dae..c45899702 100644 --- a/Samples/C/BuildExtension/Extension/PackageLock.sml +++ b/Samples/C/BuildExtension/Extension/PackageLock.sml @@ -8,7 +8,7 @@ Closures: { } Build0: { Wren: { - "mwasplund|Soup.Wren": { Version: "0.3.0" } + "mwasplund|Soup.Wren": { Version: "0.4.0" } } } Tool0: { diff --git a/Samples/C/ConsoleApplication/PackageLock.sml b/Samples/C/ConsoleApplication/PackageLock.sml index 9fbd12ce5..bfea2eaf6 100644 --- a/Samples/C/ConsoleApplication/PackageLock.sml +++ b/Samples/C/ConsoleApplication/PackageLock.sml @@ -2,18 +2,18 @@ Version: 5 Closures: { Root: { C: { - "Samples.C.ConsoleApplication": { Version: "../ConsoleApplication", Build: "Build0", Tool: "Tool0" } + 'Samples.C.ConsoleApplication': { Version: '../ConsoleApplication', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.C": { Version: "0.2.0" } + 'mwasplund|Soup.C': { Version: '0.3.0' } } } Tool0: { - "C++": { - "mwasplund|copy": { Version: "1.0.0" } - "mwasplund|mkdir": { Version: "1.0.0" } + 'C++': { + 'mwasplund|copy': { Version: '1.0.0' } + 'mwasplund|mkdir': { Version: '1.0.0' } } } } \ No newline at end of file diff --git a/Samples/C/ConsoleApplication/Recipe.sml b/Samples/C/ConsoleApplication/Recipe.sml index c84fa8e12..9619fbbc0 100644 --- a/Samples/C/ConsoleApplication/Recipe.sml +++ b/Samples/C/ConsoleApplication/Recipe.sml @@ -1,7 +1,7 @@ -Name: "Samples.C.ConsoleApplication" -Language: "C|0" -Type: "Executable" -Version: "1.0.0" +Name: 'Samples.C.ConsoleApplication' +Language: 'C|0' +Type: 'Executable' +Version: '1.0.0' Source: [ - "Main.c" + 'Main.c' ] \ No newline at end of file diff --git a/Samples/CSharp/ConsoleApplication/PackageLock.sml b/Samples/CSharp/ConsoleApplication/PackageLock.sml index b8cb0061a..3e4cdb9ca 100644 --- a/Samples/CSharp/ConsoleApplication/PackageLock.sml +++ b/Samples/CSharp/ConsoleApplication/PackageLock.sml @@ -1,19 +1,19 @@ Version: 5 Closures: { Root: { - "C#": { - "Samples.CSharp.ConsoleApplication": { Version: "../ConsoleApplication", Build: "Build0", Tool: "Tool0" } + 'C#': { + 'Samples.CSharp.ConsoleApplication': { Version: '../ConsoleApplication', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.CSharp": { Version: "0.12.0" } + 'mwasplund|Soup.CSharp': { Version: '0.13.0' } } } Tool0: { - "C++": { - "mwasplund|copy": { Version: "1.0.0" } - "mwasplund|mkdir": { Version: "1.0.0" } + 'C++': { + 'mwasplund|copy': { Version: '1.0.0' } + 'mwasplund|mkdir': { Version: '1.0.0' } } } } \ No newline at end of file diff --git a/Samples/CSharp/ConsoleApplication/Recipe.sml b/Samples/CSharp/ConsoleApplication/Recipe.sml index b50056fee..bce86cdfc 100644 --- a/Samples/CSharp/ConsoleApplication/Recipe.sml +++ b/Samples/CSharp/ConsoleApplication/Recipe.sml @@ -1,7 +1,7 @@ -Name: "Samples.CSharp.ConsoleApplication" -Language: "C#|0" -Type: "Executable" -Version: "1.0.0" +Name: 'Samples.CSharp.ConsoleApplication' +Language: 'C#|0' +Type: 'Executable' +Version: '1.0.0' Source: [ - "Program.cs" + 'Program.cs' ] \ No newline at end of file diff --git a/Samples/Cpp/ConsoleApplication/PackageLock.sml b/Samples/Cpp/ConsoleApplication/PackageLock.sml index 75090f82c..6409e8930 100644 --- a/Samples/Cpp/ConsoleApplication/PackageLock.sml +++ b/Samples/Cpp/ConsoleApplication/PackageLock.sml @@ -1,19 +1,19 @@ Version: 5 Closures: { Root: { - "C++": { - "Samples.Cpp.ConsoleApplication": { Version: "../ConsoleApplication", Build: "Build0", Tool: "Tool0" } + 'C++': { + 'Samples.Cpp.ConsoleApplication': { Version: '../ConsoleApplication', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.Cpp": { Version: "0.11.0" } + 'mwasplund|Soup.Cpp': { Version: '0.12.0' } } } Tool0: { - "C++": { - "mwasplund|copy": { Version: "1.0.0" } - "mwasplund|mkdir": { Version: "1.0.0" } + 'C++': { + 'mwasplund|copy': { Version: '1.0.0' } + 'mwasplund|mkdir': { Version: '1.0.0' } } } } \ No newline at end of file diff --git a/Samples/Cpp/ConsoleApplication/Recipe.sml b/Samples/Cpp/ConsoleApplication/Recipe.sml index 73c3f5c7d..4b56fe841 100644 --- a/Samples/Cpp/ConsoleApplication/Recipe.sml +++ b/Samples/Cpp/ConsoleApplication/Recipe.sml @@ -1,7 +1,7 @@ -Name: "Samples.Cpp.ConsoleApplication" -Language: "C++|0" -Type: "Executable" -Version: "1.0.0" +Name: 'Samples.Cpp.ConsoleApplication' +Language: 'C++|0' +Type: 'Executable' +Version: '1.0.0' Source: [ - "Main.cpp" + 'Main.cpp' ] \ No newline at end of file diff --git a/Scripts/Linux/release b/Scripts/Linux/release index 88876dfb1..859271134 100755 --- a/Scripts/Linux/release +++ b/Scripts/Linux/release @@ -9,4 +9,4 @@ OUT_DIR=$ROOT_DIR/out RUN_DIR=$OUT_DIR/run # Cleanup previous runs -tar -a -cf $OUT_DIR/soup-build-0.36.0-linux-x64.tar.gz -C $RUN_DIR . \ No newline at end of file +tar -a -cf $OUT_DIR/soup-build-0.37.0-linux-x64.tar.gz -C $RUN_DIR . \ No newline at end of file diff --git a/Scripts/Linux/soupd b/Scripts/Linux/soupd index f5a7b6709..a5eecff88 100755 --- a/Scripts/Linux/soupd +++ b/Scripts/Linux/soupd @@ -13,7 +13,7 @@ GLOBAL_OUT_DIR=~/.soup/out CONFIG_HASH=J_HqSstV55vlb-x6RWC_hLRFRDU -SOUP_VERSION="0.36.0" +SOUP_VERSION="0.37.0" COPY_VERSION="1.0.0" MKDIR_VERSION="1.0.0" SOUP_CPP_VERSION="0.8.2" diff --git a/Scripts/Windows/generate-sml-lexer.cmd b/Scripts/Windows/generate-sml-lexer.cmd index a6b52282b..007663a7e 100644 --- a/Scripts/Windows/generate-sml-lexer.cmd +++ b/Scripts/Windows/generate-sml-lexer.cmd @@ -4,7 +4,7 @@ SET Flavor=%1 SET ScriptsDir=%~dp0 SET RootDir=%ScriptsDir%..\..\ SET ClientCoreSourceDir=Source\Client\Core\Source -SET REFLEX=%UserProfile%\source\repos\RE-flex\bin\win64\reflex.exe +SET REFLEX=%UserProfile%\Dev\Repos\RE-flex\bin\win64\reflex.exe pushd %RootDir% echo %REFLEX% %ClientCoreSourceDir%\SML\SMLParser.l -o %ClientCoreSourceDir%\SML\SMLParser.cpp diff --git a/Scripts/Windows/install.cmd b/Scripts/Windows/install.cmd index 396c88a52..fbec53def 100644 --- a/Scripts/Windows/install.cmd +++ b/Scripts/Windows/install.cmd @@ -4,5 +4,5 @@ SET RootDir=%ScriptsDir%..\.. SET OutDir=%RootDir%\out pushd %OutDir% -start msiexec /package soup-build-0.36.0-windows-x64.msi /passive +start msiexec /package soup-build-0.37.0-windows-x64.msi /passive popd \ No newline at end of file diff --git a/Scripts/Windows/soup.cmd b/Scripts/Windows/soup.cmd index a5e439f42..cd471fa53 100644 --- a/Scripts/Windows/soup.cmd +++ b/Scripts/Windows/soup.cmd @@ -12,14 +12,14 @@ SET ConfigHash=Oltq7cGwk0Rbgy1I-3mCMDDE5yM SET PKG_OWNER=mwasplund -SET SOUP_VERSION=0.36.0 +SET SOUP_VERSION=0.37.0 SET COPY_VERSION=1.0.0 SET MKDIR_VERSION=1.0.0 -SET SOUP_WREN_VERSION=0.3.0 +SET SOUP_WREN_VERSION=0.4.1 REM - Use a copy of the final binary in case we are re-buiding itself robocopy %ScriptsDir%\Install\ %RunDir%\ /MIR /NJH /NJS /NDL > NUL -robocopy %OutDir%\Cpp\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL +robocopy %OutDir%\Cpp\Local\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL robocopy %SourceDir%\Tools\Copy\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\ Recipe.sml /NJH /NJS /NDL > NUL robocopy %OutDir%\Cpp\Local\copy\%COPY_VERSION%\%ConfigHash%\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\out\ /MIR /NJH /NJS /NDL > NUL diff --git a/Scripts/Windows/soupd.cmd b/Scripts/Windows/soupd.cmd index 9e513c90b..19b23701f 100644 --- a/Scripts/Windows/soupd.cmd +++ b/Scripts/Windows/soupd.cmd @@ -12,14 +12,14 @@ SET ConfigHash=OZlIVjblazFuKXg-raWUNoGEnG4 SET PKG_OWNER=mwasplund -SET SOUP_VERSION=0.36.0 +SET SOUP_VERSION=0.37.0 SET COPY_VERSION=1.0.0 SET MKDIR_VERSION=1.0.0 -SET SOUP_WREN_VERSION=0.3.0 +SET SOUP_WREN_VERSION=0.4.1 REM - Use a copy of the final binary in case we are re-buiding itself robocopy %ScriptsDir%\Install\ %RunDir%\ /MIR /NJH /NJS /NDL > NUL -robocopy %OutDir%\Cpp\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL +robocopy %OutDir%\Cpp\Local\Soup\%SOUP_VERSION%\%ConfigHash%\bin\ %RunDir%\Soup\ /MIR /NJH /NJS /NDL > NUL robocopy %SourceDir%\Tools\Copy\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\ Recipe.sml /NJH /NJS /NDL > NUL robocopy %OutDir%\Cpp\Local\copy\%COPY_VERSION%\%ConfigHash%\ %RunDir%\Soup\BuiltIn\%PKG_OWNER%\copy\%COPY_VERSION%\out\ /MIR /NJH /NJS /NDL > NUL diff --git a/Source/Client/CLI/PackageLock.sml b/Source/Client/CLI/PackageLock.sml index 026271ea9..ccaa728be 100644 --- a/Source/Client/CLI/PackageLock.sml +++ b/Source/Client/CLI/PackageLock.sml @@ -1,46 +1,46 @@ Version: 5 Closures: { Root: { - "C++": { - copy: { Version: "../../Tools/Copy/", Build: "Build0", Tool: "Tool0" } - mkdir: { Version: "../../Tools/Mkdir/", Build: "Build0", Tool: "Tool0" } - "Monitor.Host": { Version: "../../Monitor/Host/", Build: "Build0", Tool: "Tool0" } - "Monitor.Shared": { Version: "../../Monitor/Shared/", Build: "Build0", Tool: "Tool0" } - "mwasplund|CryptoPP": { Version: "1.2.1", Build: "Build0", Tool: "Tool0" } - "mwasplund|Detours": { Version: "4.0.11", Build: "Build0", Tool: "Tool0" } - "mwasplund|Opal": { Version: "0.9.5", Build: "Build0", Tool: "Tool0" } - "mwasplund|reflex": { Version: "1.0.3", Build: "Build0", Tool: "Tool0" } - "mwasplund|wren": { Version: "1.0.4", Build: "Build0", Tool: "Tool0" } - Soup: { Version: "./", Build: "Build0", Tool: "Tool0" } - "Soup.Core": { Version: "../Core/", Build: "Build0", Tool: "Tool0" } - "Soup.Generate": { Version: "../../Generate/", Build: "Build0", Tool: "Tool0" } + 'C++': { + copy: { Version: '../../Tools/Copy/', Build: 'Build0', Tool: 'Tool0' } + mkdir: { Version: '../../Tools/Mkdir/', Build: 'Build0', Tool: 'Tool0' } + 'Monitor.Host': { Version: '../../Monitor/Host/', Build: 'Build0', Tool: 'Tool0' } + 'Monitor.Shared': { Version: '../../Monitor/Shared/', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|CryptoPP': { Version: '1.2.1', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Detours': { Version: '4.0.11', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Opal': { Version: '0.10.0', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|reflex': { Version: '1.0.4', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Soup.Test.Assert': { Version: '0.4.0', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|wren': { Version: '1.0.4', Build: 'Build0', Tool: 'Tool0' } + Soup: { Version: '../CLI', Build: 'Build0', Tool: 'Tool0' } + 'Soup.Core': { Version: '../Core/', Build: 'Build1', Tool: 'Tool0' } + 'Soup.Generate': { Version: '../../Generate/', Build: 'Build0', Tool: 'Tool0' } } Wren: { - "mwasplund|Soup.Build.Utils": { Version: "0.6.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.Cpp": { Version: "0.8.2", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.Cpp.Compiler": { Version: "0.10.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.Cpp.Compiler.GCC": { Version: "0.3.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.Cpp.Compiler.MSVC": { Version: "0.9.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.CSharp": { Version: "0.9.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.CSharp.Compiler": { Version: "0.10.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.CSharp.Compiler.Roslyn": { Version: "0.11.0", Build: "Build1", Tool: "Tool0" } - "mwasplund|Soup.Wren": { Version: "0.3.0", Build: "Build1", Tool: "Tool0" } + 'mwasplund|Soup.Build.Utils': { Version: '0.7.0', Build: 'Build2', Tool: 'Tool0' } + 'mwasplund|Soup.Wren': { Version: '0.4.1', Build: 'Build2', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.Cpp": { Version: "0.11.0" } + 'mwasplund|Soup.Cpp': { Version: '0.12.0' } } } Build1: { Wren: { - "mwasplund|Soup.Wren": { Version: "0.3.0" } + 'mwasplund|Soup.Cpp': { Version: '0.12.0' } + 'mwasplund|Soup.Test.Cpp': { Version: '0.11.0' } + } + } + Build2: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '0.4.1' } } } Tool0: { - "C++": { - "mwasplund|copy": { Version: "1.0.0" } - "mwasplund|mkdir": { Version: "1.0.0" } + 'C++': { + 'mwasplund|copy': { Version: '1.0.0' } + 'mwasplund|mkdir': { Version: '1.0.0' } } } } \ No newline at end of file diff --git a/Source/Client/CLI/Recipe.sml b/Source/Client/CLI/Recipe.sml index 8e405d453..ea47fba34 100644 --- a/Source/Client/CLI/Recipe.sml +++ b/Source/Client/CLI/Recipe.sml @@ -1,44 +1,42 @@ -Name: "Soup" -Version: "0.36.0" -Language: "C++|0" +Name: 'Soup' +Version: '0.37.0' +Language: 'C++|0' -Type: "Executable" +Type: 'Executable' Source: [ - "Source/Main.cpp" + 'Source/Main.cpp' ] IncludePaths: [ - "Source/Commands/" - "Source/Options/" + 'Source/Commands/' + 'Source/Options/' ] Dependencies: { # Ensure the core build extensions are runtime dependencies Runtime: [ - "../Core/" - "../../Generate/" - "../../Monitor/Host/" + '../Core/' + '../../Generate/' + '../../Monitor/Host/' ] Other: [ - "../../Tools/Copy/" - "../../Tools/Mkdir/" - "[Wren]mwasplund|Soup.Cpp@0" - "[Wren]mwasplund|Soup.CSharp@0" - "[Wren]mwasplund|Soup.Wren@0" + '../../Tools/Copy/' + '../../Tools/Mkdir/' + '[Wren]mwasplund|Soup.Wren@0' ] Build: [ - # TODO: "Soup.Test.Cpp@0.4.0" + # TODO: 'Soup.Test.Cpp@0.4.0' ] Test: [ - # TODO: "Soup.Test.Assert@0.3.0" + # TODO: 'Soup.Test.Assert@0.3.0' ] } Tests: { Source: [ - "UnitTests/gen/Main.cpp" + 'UnitTests/gen/Main.cpp' ] IncludePaths: [ - "UnitTests/" + 'UnitTests/' ] } diff --git a/Source/Client/CLI/Source/Commands/VersionCommand.h b/Source/Client/CLI/Source/Commands/VersionCommand.h index 8bfeb0b3a..50083feba 100644 --- a/Source/Client/CLI/Source/Commands/VersionCommand.h +++ b/Source/Client/CLI/Source/Commands/VersionCommand.h @@ -31,7 +31,7 @@ namespace Soup::Client // TODO var version = Assembly.GetExecutingAssembly().GetName().Version; // Log::Message($"{version.Major}.{version.Minor}.{version.Build}"); - Log::HighPriority("0.36.0"); + Log::HighPriority("0.37.0"); } private: diff --git a/Source/Client/Core/Recipe.sml b/Source/Client/Core/Recipe.sml index a12c82aeb..160626ba8 100644 --- a/Source/Client/Core/Recipe.sml +++ b/Source/Client/Core/Recipe.sml @@ -1,41 +1,41 @@ -Name: "Soup.Core" -Language: "C++|0" -Version: "0.1.1" +Name: 'Soup.Core' +Language: 'C++|0' +Version: '0.1.1' Defines: [ - # "LOCAL_DEBUG" - # "TRACE_SYSTEM_ACCESS" + # 'LOCAL_DEBUG' + # 'TRACE_SYSTEM_ACCESS' ] IncludePaths: [ - "Source/" + 'Source/' ] -Interface: "Source/Module.cpp" +Interface: 'Source/Module.cpp' Source: [ - "Source/Recipe/LanguageReferenceParser.cpp" - "Source/SML/SMLParser.cpp" - "Source/ValueTable/Value.cpp" + 'Source/Recipe/LanguageReferenceParser.cpp' + 'Source/SML/SMLParser.cpp' + 'Source/ValueTable/Value.cpp' ] Dependencies: { Build: [ - # TODO: "Soup.Test.Cpp@0.6.0" + 'mwasplund|Soup.Test.Cpp@0' ] Runtime: [ - "mwasplund|Opal@0" - "mwasplund|reflex@1" - "../../Monitor/Host/" - "mwasplund|wren@1" - "mwasplund|CryptoPP@1" + 'mwasplund|Opal@0' + 'mwasplund|reflex@1' + '../../Monitor/Host/' + 'mwasplund|wren@1' + 'mwasplund|CryptoPP@1' ] Test: [ - # TODO: "Soup.Test.Assert@0.3" + 'mwasplund|Soup.Test.Assert@0' ] } Tests: { Source: [ - "UnitTests/gen/Main.cpp" + 'UnitTests/gen/Main.cpp' ] IncludePaths: [ - "UnitTests/" + 'UnitTests/' ] } diff --git a/Source/Client/Core/Source/Build/BuildEngine.h b/Source/Client/Core/Source/Build/BuildEngine.h index 66f5ac4ce..879cdf9f6 100644 --- a/Source/Client/Core/Source/Build/BuildEngine.h +++ b/Source/Client/Core/Source/Build/BuildEngine.h @@ -66,7 +66,7 @@ namespace Soup::Core { { PackageName("mwasplund", "Soup.Wren"), - SemanticVersion(0, 3, 0) + SemanticVersion(0, 4, 1) }, } }, diff --git a/Source/Client/Core/Source/SML/SML.h b/Source/Client/Core/Source/SML/SML.h index 4a842ce2e..a403e5420 100644 --- a/Source/Client/Core/Source/SML/SML.h +++ b/Source/Client/Core/Source/SML/SML.h @@ -288,7 +288,7 @@ namespace Soup::Core break; case SMLValueType::String: // TODO: Escape characters - stream << "\"" << value.AsString() << "\""; + stream << "'" << value.AsString() << "'"; break; case SMLValueType::Array: stream << value.AsArray(); diff --git a/Source/Client/Core/Source/SML/SMLParser.cpp b/Source/Client/Core/Source/SML/SMLParser.cpp index 2414a76f2..6ba4c5638 100644 --- a/Source/Client/Core/Source/SML/SMLParser.cpp +++ b/Source/Client/Core/Source/SML/SMLParser.cpp @@ -241,52 +241,52 @@ int Soup::Core::SML::Lexer::lex(void) return int(); } break; - case 1: // rule Source\Client\Core\Source\SML\SMLParser.l:89: {whitespace} : + case 1: // rule Source\Client\Core\Source\SML\SMLParser.l:105: {whitespace} : { /* ignore whitespace */ } break; - case 2: // rule Source\Client\Core\Source\SML\SMLParser.l:90: {comment} : + case 2: // rule Source\Client\Core\Source\SML\SMLParser.l:106: {comment} : { /* ignore comments */ } break; - case 3: // rule Source\Client\Core\Source\SML\SMLParser.l:91: {newline} : + case 3: // rule Source\Client\Core\Source\SML\SMLParser.l:107: {newline} : return (int)SMLToken::Newline; break; - case 4: // rule Source\Client\Core\Source\SML\SMLParser.l:92: {integer} : + case 4: // rule Source\Client\Core\Source\SML\SMLParser.l:108: {integer} : return (int)SMLToken::Integer; break; - case 5: // rule Source\Client\Core\Source\SML\SMLParser.l:93: "true" : + case 5: // rule Source\Client\Core\Source\SML\SMLParser.l:109: "true" : return (int)SMLToken::True; break; - case 6: // rule Source\Client\Core\Source\SML\SMLParser.l:94: "false" : + case 6: // rule Source\Client\Core\Source\SML\SMLParser.l:110: "false" : return (int)SMLToken::False; break; - case 7: // rule Source\Client\Core\Source\SML\SMLParser.l:95: {key} : + case 7: // rule Source\Client\Core\Source\SML\SMLParser.l:111: {key} : return (int)SMLToken::KeyLiteral; break; - case 8: // rule Source\Client\Core\Source\SML\SMLParser.l:96: {decimal} : + case 8: // rule Source\Client\Core\Source\SML\SMLParser.l:112: {decimal} : return (int)SMLToken::Decimal; break; - case 9: // rule Source\Client\Core\Source\SML\SMLParser.l:97: ":" : + case 9: // rule Source\Client\Core\Source\SML\SMLParser.l:113: ":" : return (int)SMLToken::Colon; break; - case 10: // rule Source\Client\Core\Source\SML\SMLParser.l:98: "[" : + case 10: // rule Source\Client\Core\Source\SML\SMLParser.l:114: "[" : return (int)SMLToken::OpenBracket; break; - case 11: // rule Source\Client\Core\Source\SML\SMLParser.l:99: "]" : + case 11: // rule Source\Client\Core\Source\SML\SMLParser.l:115: "]" : return (int)SMLToken::CloseBracket; break; - case 12: // rule Source\Client\Core\Source\SML\SMLParser.l:100: "{" : + case 12: // rule Source\Client\Core\Source\SML\SMLParser.l:116: "{" : return (int)SMLToken::OpenBrace; break; - case 13: // rule Source\Client\Core\Source\SML\SMLParser.l:101: "}" : + case 13: // rule Source\Client\Core\Source\SML\SMLParser.l:117: "}" : return (int)SMLToken::CloseBrace; break; - case 14: // rule Source\Client\Core\Source\SML\SMLParser.l:102: "," : + case 14: // rule Source\Client\Core\Source\SML\SMLParser.l:118: "," : return (int)SMLToken::Comma; break; - case 15: // rule Source\Client\Core\Source\SML\SMLParser.l:103: \" : + case 15: // rule Source\Client\Core\Source\SML\SMLParser.l:119: "'" : { ClearString(); start(QUOTE); } break; - case 16: // rule Source\Client\Core\Source\SML\SMLParser.l:104: . : + case 16: // rule Source\Client\Core\Source\SML\SMLParser.l:120: . : return (int)SMLToken::Error; break; @@ -307,37 +307,37 @@ return (int)SMLToken::Error; return int(); } break; - case 1: // rule Source\Client\Core\Source\SML\SMLParser.l:107: \" : + case 1: // rule Source\Client\Core\Source\SML\SMLParser.l:123: ' : { start(INITIAL); return (int)SMLToken::StringLiteral; } break; - case 2: // rule Source\Client\Core\Source\SML\SMLParser.l:108: \\0 : + case 2: // rule Source\Client\Core\Source\SML\SMLParser.l:124: \\0 : { AddCharacter('\0'); } break; - case 3: // rule Source\Client\Core\Source\SML\SMLParser.l:109: \\t : + case 3: // rule Source\Client\Core\Source\SML\SMLParser.l:125: \\t : { AddCharacter('\t'); } // tab (U+0009) break; - case 4: // rule Source\Client\Core\Source\SML\SMLParser.l:110: \\n : + case 4: // rule Source\Client\Core\Source\SML\SMLParser.l:126: \\n : { AddCharacter('\n'); } // linefeed (U+000A) break; - case 5: // rule Source\Client\Core\Source\SML\SMLParser.l:111: \\f : + case 5: // rule Source\Client\Core\Source\SML\SMLParser.l:127: \\f : { AddCharacter('\f'); } // form feed (U+000C) break; - case 6: // rule Source\Client\Core\Source\SML\SMLParser.l:112: \\r : + case 6: // rule Source\Client\Core\Source\SML\SMLParser.l:128: \\r : { AddCharacter('\r'); } // carriage return (U+000D) break; - case 7: // rule Source\Client\Core\Source\SML\SMLParser.l:113: \\e : + case 7: // rule Source\Client\Core\Source\SML\SMLParser.l:129: \\e : { AddCharacter('\r'); } // escape (U+001B) break; - case 8: // rule Source\Client\Core\Source\SML\SMLParser.l:114: \\\" : -{ AddCharacter('"'); } // quote (U+0022) + case 8: // rule Source\Client\Core\Source\SML\SMLParser.l:130: \\' : +{ AddCharacter('\''); } // quote (U+001B) break; - case 9: // rule Source\Client\Core\Source\SML\SMLParser.l:115: \\\\ : + case 9: // rule Source\Client\Core\Source\SML\SMLParser.l:131: \\\\ : { AddCharacter('\\'); } // backslash (U+005C) break; - case 10: // rule Source\Client\Core\Source\SML\SMLParser.l:116: {basic_string} : + case 10: // rule Source\Client\Core\Source\SML\SMLParser.l:132: {basic_string} : { AddString(text(), size()); } break; - case 11: // rule Source\Client\Core\Source\SML\SMLParser.l:117: . : + case 11: // rule Source\Client\Core\Source\SML\SMLParser.l:133: . : { AddString(text(), size()); } break; } @@ -607,7 +607,7 @@ class SMLParser : public SML::Lexer } case SMLToken::Integer: { - int64_t integer = std::stoll(text()); + auto integer = std::stoll(text()); value = SMLValue(integer); return true; } @@ -695,8 +695,8 @@ class SMLParser : public SML::Lexer case SMLToken::Newline: std::cout << "Token: " << "Newline" << '\n'; break; - case SMLToken::Key: - std::cout << "Token: " << "Key" << '\n'; + case SMLToken::KeyLiteral: + std::cout << "Token: " << "KeyLiteral" << '\n'; break; case SMLToken::Integer: std::cout << "Token: " << "Integer" << '\n'; @@ -845,8 +845,8 @@ void reflex_code_INITIAL(reflex::Matcher& m) if ('0' <= c1 && c1 <= '9') goto S184; if (c1 == '.') goto S139; if (c1 == ',') goto S166; + if (c1 == '\'') goto S169; if (c1 == '#') goto S52; - if (c1 == '"') goto S169; if (c1 == ' ') goto S175; if (c1 == '\r') goto S180; if (c1 == '\n') goto S57; @@ -9183,7 +9183,7 @@ void reflex_code_QUOTE(reflex::Matcher& m) if (195 <= c1 && c1 <= 204) goto S90; if (c1 == 194) goto S85; if (c1 == '\\') goto S37; - if (c1 == '"') goto S34; + if (c1 == '\'') goto S34; if (' ' <= c1 && c1 <= '~') goto S51; if ('\v' <= c1) goto S48; if ('\n' <= c1) return m.FSM_HALT(c1); @@ -9208,7 +9208,7 @@ void reflex_code_QUOTE(reflex::Matcher& m) if (c1 == 'e') goto S372; if (c1 == '\\') goto S376; if (c1 == '0') goto S362; - if (c1 == '"') goto S374; + if (c1 == '\'') goto S374; return m.FSM_HALT(c1); S48: @@ -9249,8 +9249,8 @@ void reflex_code_QUOTE(reflex::Matcher& m) if (c1 == 194) goto S411; if (128 <= c1 && c1 <= 191) goto S48; if (']' <= c1 && c1 <= '~') goto S378; - if ('#' <= c1 && c1 <= '[') goto S378; - if (' ' <= c1 && c1 <= '!') goto S378; + if ('(' <= c1 && c1 <= '[') goto S378; + if (' ' <= c1 && c1 <= '&') goto S378; if (c1 == '\t') goto S378; return m.FSM_HALT(c1); @@ -9675,8 +9675,8 @@ void reflex_code_QUOTE(reflex::Matcher& m) if (195 <= c1 && c1 <= 204) goto S414; if (c1 == 194) goto S411; if (']' <= c1 && c1 <= '~') goto S378; - if ('#' <= c1 && c1 <= '[') goto S378; - if (' ' <= c1 && c1 <= '!') goto S378; + if ('(' <= c1 && c1 <= '[') goto S378; + if (' ' <= c1 && c1 <= '&') goto S378; if (c1 == '\t') goto S378; return m.FSM_HALT(c1); diff --git a/Source/Client/Core/Source/SML/SMLParser.l b/Source/Client/Core/Source/SML/SMLParser.l index 27423954a..0e0f23b27 100644 --- a/Source/Client/Core/Source/SML/SMLParser.l +++ b/Source/Client/Core/Source/SML/SMLParser.l @@ -1,6 +1,8 @@ %top{ +#ifdef SOUP_BUILD module; +#endif // #define SHOW_TOKENS @@ -10,8 +12,24 @@ module; # include # include +#ifndef _WIN32 // TODO: MSVC BUG +# include +# include +# include +#endif + +#ifdef SOUP_BUILD module Soup.Core; +import reflex; + +#else + +#include +#include +#include "SML.h" + +#endif enum class SMLToken : int { @@ -74,7 +92,7 @@ private: // TODO: Remove extra symbols %x QUOTE -basic_char [\t\p{L}\p{N}\p{M}\p{P}\p{S}\p{Z}]{-}["\\] +basic_char [\t\p{L}\p{N}\p{M}\p{P}\p{S}\p{Z}]{-}['\\] whitespace [ \t]+ newline \r?\n comment "#".*?\r?\n @@ -98,18 +116,18 @@ basic_string {basic_char}+ "{" return (int)SMLToken::OpenBrace; "}" return (int)SMLToken::CloseBrace; "," return (int)SMLToken::Comma; -\" { ClearString(); start(QUOTE); } +"'" { ClearString(); start(QUOTE); } . return (int)SMLToken::Error; { -\" { start(INITIAL); return (int)SMLToken::StringLiteral; } +' { start(INITIAL); return (int)SMLToken::StringLiteral; } \\0 { AddCharacter('\0'); } \\t { AddCharacter('\t'); } // tab (U+0009) \\n { AddCharacter('\n'); } // linefeed (U+000A) \\f { AddCharacter('\f'); } // form feed (U+000C) \\r { AddCharacter('\r'); } // carriage return (U+000D) \\e { AddCharacter('\r'); } // escape (U+001B) -\\\" { AddCharacter('"'); } // quote (U+0022) +\\' { AddCharacter('\''); } // quote (U+001B) \\\\ { AddCharacter('\\'); } // backslash (U+005C) {basic_string} { AddString(text(), size()); } . { AddString(text(), size()); } @@ -456,8 +474,8 @@ private: case SMLToken::Newline: std::cout << "Token: " << "Newline" << '\n'; break; - case SMLToken::Key: - std::cout << "Token: " << "Key" << '\n'; + case SMLToken::KeyLiteral: + std::cout << "Token: " << "KeyLiteral" << '\n'; break; case SMLToken::Integer: std::cout << "Token: " << "Integer" << '\n'; diff --git a/Source/Client/Core/UnitTests/Build/BuildEngineTests.h b/Source/Client/Core/UnitTests/Build/BuildEngineTests.h index 58b6b737d..cd28c7f48 100644 --- a/Source/Client/Core/UnitTests/Build/BuildEngineTests.h +++ b/Source/Client/Core/UnitTests/Build/BuildEngineTests.h @@ -29,15 +29,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|0.8.2" + Name: 'MyPackage' + Language: 'C++|0.8.2' )"))); fileSystem->CreateMockFile( - Path("C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/Recipe.sml"), + Path("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' + )"))); + + fileSystem->CreateMockFile( + Path("C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/Recipe.sml"), + std::make_shared(std::stringstream(R"( + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -47,29 +54,59 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.Cpp": { Version: "0.8.2" } + 'mwasplund|Soup.Cpp': { Version: '0.8.2' } } } Tool0: {} } )"))); - auto operationGraph = OperationGraph( + fileSystem->CreateMockFile( + Path("C:/Users/Me/.soup/locks/Wren/mwasplund/Soup.Cpp/0.8.2/PackageLock.sml"), + std::make_shared(std::stringstream(R"( + Version: 5 + Closures: { + Root: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: './', Build: 'Build0', Tool: 'Tool0' } + } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '0.4.1' } + } + } + Tool0: {} + } + )"))); + + auto fileSystemState = FileSystemState(); + + auto myPackageOperationGraph = OperationGraph( std::vector(), std::vector()); - auto files = std::set(); - auto fileSystemState = FileSystemState(); - auto operationGraphContent = std::stringstream(); - OperationGraphWriter::Serialize(operationGraph, files, fileSystemState, operationGraphContent); + auto myPackageFiles = std::set(); + auto myPackageOperationGraphContent = std::stringstream(); + OperationGraphWriter::Serialize(myPackageOperationGraph, myPackageFiles, fileSystemState, myPackageOperationGraphContent); fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/out/J_HqSstV55vlb-x6RWC_hLRFRDU/.soup/Evaluate.bog"), - std::make_shared(std::move(operationGraphContent))); + std::make_shared(std::move(myPackageOperationGraphContent))); + + auto soupCppOperationGraph = OperationGraph( + std::vector(), + std::vector()); + auto soupCppFiles = std::set(); + auto soupCppOperationGraphContent = std::stringstream(); + OperationGraphWriter::Serialize(soupCppOperationGraph, soupCppFiles, fileSystemState, soupCppOperationGraphContent); + fileSystem->CreateMockFile( + Path("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bog"), + std::make_shared(std::move(soupCppOperationGraphContent))); // Register the test process manager auto processManager = std::make_shared(); @@ -107,8 +144,50 @@ namespace Soup::Core::UnitTests "DIAG: Load PackageLock: C:/WorkingDirectory/MyPackage/PackageLock.sml", "INFO: Package lock loaded", "DIAG: Load Recipe: C:/WorkingDirectory/MyPackage/Recipe.sml", - "DIAG: Load Recipe: C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/Recipe.sml", - "DIAG: 0>Package was prebuilt: mwasplund|Soup.Cpp", + "DIAG: Load Recipe: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/Recipe.sml", + "DIAG: Load PackageLock: C:/Users/Me/.soup/locks/Wren/mwasplund/Soup.Cpp/0.8.2/PackageLock.sml", + "INFO: Package lock loaded", + "DIAG: Load Recipe: C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/Recipe.sml", + "DIAG: 0>Package was prebuilt: mwasplund|Soup.Wren", + "DIAG: 2>Running Build: [Wren]mwasplund|Soup.Cpp", + "INFO: 2>Build 'mwasplund|Soup.Cpp'", + "INFO: 2>Checking for existing Evaluate Operation Graph", + "DIAG: 2>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bog", + "INFO: 2>Previous graph found", + "INFO: 2>Checking for existing Evaluate Operation Results", + "DIAG: 2>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bor", + "INFO: 2>Operation results file does not exist", + "INFO: 2>No previous results found", + "INFO: 2>Check outdated generate input file: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/GenerateInput.bvt", + "INFO: 2>Value Table file does not exist", + "INFO: 2>Save Generate Input file", + "INFO: 2>Create Directory: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/", + "INFO: 2>Checking for existing Generate Operation Results", + "DIAG: 2>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Generate.bor", + "INFO: 2>Operation results file does not exist", + "INFO: 2>No previous results found", + "DIAG: 2>Build evaluation start", + "DIAG: 2>Check for previous operation invocation", + "INFO: 2>Operation has no successful previous invocation", + "HIGH: 2>Generate: [Wren]mwasplund|Soup.Cpp", + "DIAG: 2>Execute: [C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/] C:/testlocation/Soup.Generate.exe C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/", + "DIAG: 2>Allowed Read Access:", + "DIAG: 2>C:/testlocation/", + "DIAG: 2>C:/Users/Me/.soup/LocalUserConfig.sml", + "DIAG: 2>C:/Windows/", + "DIAG: 2>C:/Program Files/dotnet/", + "DIAG: 2>C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/out/", + "DIAG: 2>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/", + "DIAG: 2>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/", + "DIAG: 2>Allowed Write Access:", + "DIAG: 2>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/", + "DIAG: 2>Build evaluation end", + "INFO: 2>Loading new Evaluate Operation Graph", + "DIAG: 2>Map previous operation graph observed results", + "INFO: 2>Create Directory: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/temp/", + "DIAG: 2>Build evaluation start", + "DIAG: 2>Build evaluation end", + "INFO: 2>Done", "DIAG: 1>Running Build: [C++]MyPackage", "INFO: 1>Build 'MyPackage'", "INFO: 1>Checking for existing Evaluate Operation Graph", @@ -136,7 +215,7 @@ namespace Soup::Core::UnitTests "DIAG: 1>C:/Users/Me/.soup/LocalUserConfig.sml", "DIAG: 1>C:/Windows/", "DIAG: 1>C:/Program Files/dotnet/", - "DIAG: 1>C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/out/", + "DIAG: 1>C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/", "DIAG: 1>C:/WorkingDirectory/MyPackage/", "DIAG: 1>C:/WorkingDirectory/MyPackage/out/J_HqSstV55vlb-x6RWC_hLRFRDU/", "DIAG: 1>Allowed Write Access:", @@ -156,6 +235,7 @@ namespace Soup::Core::UnitTests Assert::AreEqual( std::vector({ "GetCurrentTime", + "GetCurrentTime", }), system->GetRequests(), "Verify system requests match expected."); @@ -168,8 +248,33 @@ namespace Soup::Core::UnitTests "OpenReadBinary: C:/WorkingDirectory/MyPackage/PackageLock.sml", "Exists: C:/WorkingDirectory/MyPackage/Recipe.sml", "OpenReadBinary: C:/WorkingDirectory/MyPackage/Recipe.sml", - "Exists: C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/Recipe.sml", - "OpenReadBinary: C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/Recipe.sml", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/Recipe.sml", + "OpenReadBinary: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/Recipe.sml", + "Exists: C:/Users/Me/.soup/locks/Wren/mwasplund/Soup.Cpp/0.8.2/PackageLock.sml", + "OpenReadBinary: C:/Users/Me/.soup/locks/Wren/mwasplund/Soup.Cpp/0.8.2/PackageLock.sml", + "Exists: C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/Recipe.sml", + "OpenReadBinary: C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/Recipe.sml", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/RootRecipe.sml", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/RootRecipe.sml", + "Exists: C:/Users/Me/.soup/packages/Wren/RootRecipe.sml", + "Exists: C:/Users/Me/.soup/packages/RootRecipe.sml", + "Exists: C:/Users/Me/.soup/RootRecipe.sml", + "Exists: C:/Users/Me/RootRecipe.sml", + "Exists: C:/Users/RootRecipe.sml", + "Exists: C:/RootRecipe.sml", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bog", + "OpenReadBinary: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bog", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bor", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/GenerateInput.bvt", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/", + "CreateDirectory: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/", + "OpenWriteBinary: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/GenerateInput.bvt", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Generate.bor", + "OpenWriteBinary: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Generate.bor", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bog", + "OpenReadBinary: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Evaluate.bog", + "Exists: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/temp/", + "CreateDirectory: C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/temp/", "Exists: C:/WorkingDirectory/RootRecipe.sml", "Exists: C:/RootRecipe.sml", "Exists: C:/WorkingDirectory/MyPackage/out/J_HqSstV55vlb-x6RWC_hLRFRDU/.soup/Evaluate.bog", @@ -193,18 +298,25 @@ namespace Soup::Core::UnitTests Assert::AreEqual( std::vector({ "GetCurrentProcessFileName", + "GetCurrentProcessFileName", }), processManager->GetRequests(), "Verify process manager requests match expected."); Assert::AreEqual( std::vector({ - "CreateMonitorProcess: 1 [C:/WorkingDirectory/MyPackage/] C:/testlocation/Soup.Generate.exe C:/WorkingDirectory/MyPackage/out/J_HqSstV55vlb-x6RWC_hLRFRDU/.soup/ Environment [2] 1 AllowedRead [7] AllowedWrite [1]", + "CreateMonitorProcess: 1 [C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/] C:/testlocation/Soup.Generate.exe C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/ Environment [2] 1 AllowedRead [7] AllowedWrite [1]", "ProcessStart: 1", "WaitForExit: 1", "GetStandardOutput: 1", "GetStandardError: 1", "GetExitCode: 1", + "CreateMonitorProcess: 2 [C:/WorkingDirectory/MyPackage/] C:/testlocation/Soup.Generate.exe C:/WorkingDirectory/MyPackage/out/J_HqSstV55vlb-x6RWC_hLRFRDU/.soup/ Environment [2] 1 AllowedRead [7] AllowedWrite [1]", + "ProcessStart: 2", + "WaitForExit: 2", + "GetStandardOutput: 2", + "GetStandardError: 2", + "GetExitCode: 2", }), monitorProcessManager->GetRequests(), "Verify monitor process manager requests match expected."); @@ -213,8 +325,7 @@ namespace Soup::Core::UnitTests auto myPackageGenerateInputMockFile = fileSystem->GetMockFile( Path("C:/WorkingDirectory/MyPackage/out/J_HqSstV55vlb-x6RWC_hLRFRDU/.soup/GenerateInput.bvt")); Assert::AreEqual( - ValueTable( - { + ValueTable({ { "Dependencies", ValueTable( @@ -227,7 +338,7 @@ namespace Soup::Core::UnitTests "mwasplund|Soup.Cpp", ValueTable( { - { "SoupTargetDirectory", std::string("C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/out/.soup/") }, + { "SoupTargetDirectory", std::string("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/") }, }) }, }) @@ -261,7 +372,7 @@ namespace Soup::Core::UnitTests "GenerateMacros", ValueTable( { - { "/(BUILD_TARGET_mwasplund|Soup.Cpp)/", std::string("C:/BuiltIn/Packages/mwasplund/Soup.Cpp/0.8.2/out/") }, + { "/(BUILD_TARGET_mwasplund|Soup.Cpp)/", std::string("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/") }, }) }, { @@ -343,6 +454,145 @@ namespace Soup::Core::UnitTests }), myPackageGenerateResults, "Verify my package generate results content match expected."); + + auto soupCppGenerateInputMockFile = fileSystem->GetMockFile( + Path("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/GenerateInput.bvt")); + Assert::AreEqual( + ValueTable({ + { + "Dependencies", + ValueTable( + { + { + "Build", + ValueTable( + { + { + "mwasplund|Soup.Wren", + ValueTable( + { + { "SoupTargetDirectory", std::string("C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/out/.soup/") }, + }) + }, + }) + }, + }) + }, + { + "EvaluateMacros", + ValueTable( + { + { "/(PACKAGE_mwasplund|Soup.Cpp)/", std::string("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/") }, + { "/(TARGET_mwasplund|Soup.Cpp)/", std::string("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/") }, + }) + }, + { + "EvaluateReadAccess", + ValueList( + { + std::string("/(PACKAGE_mwasplund|Soup.Cpp)/"), + std::string("/(TARGET_mwasplund|Soup.Cpp)/"), + }) + }, + { + "EvaluateWriteAccess", + ValueList( + { + std::string("/(TARGET_mwasplund|Soup.Cpp)/"), + }) + }, + { + "GenerateMacros", + ValueTable( + { + { "/(BUILD_TARGET_mwasplund|Soup.Wren)/", std::string("C:/BuiltIn/Packages/mwasplund/Soup.Wren/0.4.1/out/") }, + }) + }, + { + "GenerateSubGraphMacros", + ValueTable( + { + { "/(TARGET_mwasplund|Soup.Wren)/", std::string("/(BUILD_TARGET_mwasplund|Soup.Wren)/") }, + }) + }, + { + "GlobalState", + ValueTable( + { + { + "Context", + ValueTable( + { + { "HostPlatform", std::string("TestPlatform") }, + { "PackageDirectory", std::string("/(PACKAGE_mwasplund|Soup.Cpp)/") }, + { "TargetDirectory", std::string("/(TARGET_mwasplund|Soup.Cpp)/") }, + }) + }, + { + "Dependencies", + ValueTable( + { + { + "Build", + ValueTable( + { + { + "mwasplund|Soup.Wren", + ValueTable( + { + { + "Context", + ValueTable( + { + { "Reference", std::string("[Wren]mwasplund|Soup.Wren@0.4.1") }, + { "TargetDirectory", std::string("/(TARGET_mwasplund|Soup.Wren)/") }, + }) + }, + }) + }, + }) + }, + }) + }, + { + "Parameters", + ValueTable( + { + { "System", std::string("Windows") }, + }) + }, + }) + }, + { + "PackageRoot", + std::string("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/") + }, + { + "UserDataPath", + std::string("C:/Users/Me/.soup/") + }, + }), + ValueTableReader::Deserialize(soupCppGenerateInputMockFile->Content), + "Verify file content match expected."); + + auto soupCppGenerateResultsMockFile = fileSystem->GetMockFile( + Path("C:/Users/Me/.soup/packages/Wren/mwasplund/Soup.Cpp/0.8.2/out/tsWW3RZ_9Jb7Xbk2kTzx3n6uQUM/.soup/Generate.bor")); + auto soupCppGenerateResults = OperationResultsReader::Deserialize(soupCppGenerateResultsMockFile->Content, fileSystemState); + + Assert::AreEqual( + OperationResults({ + { + 1, + OperationResult( + true, + std::chrono::clock_cast( + std::chrono::time_point()), + {}, + {}) + }, + }), + soupCppGenerateResults, + "Verify my package generate results content match expected."); } }; } diff --git a/Source/Client/Core/UnitTests/Build/BuildLoadEngineTests.h b/Source/Client/Core/UnitTests/Build/BuildLoadEngineTests.h index a0ec58a0d..6ea167495 100644 --- a/Source/Client/Core/UnitTests/Build/BuildLoadEngineTests.h +++ b/Source/Client/Core/UnitTests/Build/BuildLoadEngineTests.h @@ -46,8 +46,8 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1.1.1" + Name: 'MyPackage' + Language: 'C++|1.1.1' )"))); auto builtInPackageDirectory = Path("C:/BuiltIn/Packages/"); @@ -108,18 +108,18 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1.1.1" + Name: 'MyPackage' + Language: 'C++|1.1.1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' Dependencies: { Tool: [ - "[C++]User1|TestTool@4.4.4" + '[C++]User1|TestTool@4.4.4' ] } )"))); @@ -127,8 +127,8 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/TestTool/4.4.4/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestTool" - Language: "C++|1.1.1" + Name: 'TestTool' + Language: 'C++|1.1.1' )"))); // Create the package lock @@ -138,18 +138,18 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: { - "C++": { - "User1|TestTool": { Version: "4.4.4" } + 'C++': { + 'User1|TestTool': { Version: '4.4.4' } } } } @@ -341,15 +341,15 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1.1.1" + Name: 'MyPackage' + Language: 'C++|1.1.1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); // Create the package lock @@ -359,13 +359,13 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: {} @@ -523,18 +523,18 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|4.5.6" + Name: 'MyPackage' + Language: 'C++|4.5.6' )"))); fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/Soup.Cpp/4.5.6/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|2.2.2" + Name: 'Soup.Cpp' + Language: 'Wren|2.2.2' Dependencies: { Tool: [ - "[C++]User1|TestTool@4.4.4" + '[C++]User1|TestTool@4.4.4' ] } )"))); @@ -542,22 +542,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Cpp/User1/TestTool/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestTool" - Language: "C++|1.1.1" + Name: 'TestTool' + Language: 'C++|1.1.1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|2.2.2" + Name: 'Soup.Cpp' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|2.2.2" + Name: 'Soup.Wren' + Language: 'Wren|2.2.2' )"))); // Create the package lock @@ -567,18 +567,18 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "4.5.6" } + 'User1|Soup.Cpp': { Version: '4.5.6' } } } Tool0: { - "C++": { - "User1|TestTool": { Version: "3.3.3" } + 'C++': { + 'User1|TestTool': { Version: '3.3.3' } } } } @@ -591,12 +591,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|Soup.Cpp": { Version: "../Soup.Cpp/", Build: "Build0", Tool: "Tool0" } + 'User1|Soup.Cpp': { Version: '../Soup.Cpp/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -609,13 +609,13 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - "User1|TestTool": { Version: "../TestTool/", Build: "Build0", Tool: "Tool0" } + 'C++': { + 'User1|TestTool': { Version: '../TestTool/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: {} @@ -869,11 +869,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "User1|TestBuild@3.3.3" + 'User1|TestBuild@3.3.3' ] } )"))); @@ -881,22 +881,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -906,14 +906,14 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } - "User1|TestBuild": { Version: "3.3.3" } + 'User1|Soup.Cpp': { Version: '1.1.1' } + 'User1|TestBuild': { Version: '3.3.3' } } } Tool0: { @@ -928,12 +928,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild": { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild': { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -1153,11 +1153,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "User1|TestBuild@3.3.3" + 'User1|TestBuild@3.3.3' ] } )"))); @@ -1165,11 +1165,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' Dependencies: { Tool: [ - "[C++]User1|TestTool@4.4.4" + '[C++]User1|TestTool@4.4.4' ] } )"))); @@ -1177,22 +1177,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Cpp/User1/TestTool/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestTool" - Language: "C++|1.1.1" + Name: 'TestTool' + Language: 'C++|1.1.1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -1202,19 +1202,19 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } - "User1|TestBuild": { Version: "3.3.3", Tool: "Tool0" } + 'User1|Soup.Cpp': { Version: '1.1.1' } + 'User1|TestBuild': { Version: '3.3.3', Tool: 'Tool0' } } } Tool0: { - "C++": { - "User1|TestTool": { Version: "3.3.3" } + 'C++': { + 'User1|TestTool': { Version: '3.3.3' } } } } @@ -1227,12 +1227,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild": { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild': { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -1245,13 +1245,13 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - "User1|TestTool": { Version: "../TestTool/", Build: "Build0", Tool: "Tool0" } + 'C++': { + 'User1|TestTool': { Version: '../TestTool/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: {} @@ -1516,11 +1516,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1.1.1" + Name: 'MyPackage' + Language: 'C++|1.1.1' Dependencies: { Build: [ - "../TestBuild/" + '../TestBuild/' ] } )"))); @@ -1528,22 +1528,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/TestBuild/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -1553,13 +1553,13 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: {} @@ -1573,12 +1573,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - TestBuild: { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } + TestBuild: { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -1792,11 +1792,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "TestBuild@3.3.3" + 'TestBuild@3.3.3' ] } )"))); @@ -1804,22 +1804,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -1829,14 +1829,14 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } - "User1|TestBuild": { Version: "3.3.3" } + 'User1|Soup.Cpp': { Version: '1.1.1' } + 'User1|TestBuild': { Version: '3.3.3' } } } Tool0: { @@ -1931,11 +1931,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "User1|TestBuild@3.3.3" + 'User1|TestBuild@3.3.3' ] } )"))); @@ -1943,11 +1943,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' Dependencies: { Runtime: [ - "TestBuild2@4.4.4" + 'TestBuild2@4.4.4' ] } )"))); @@ -1955,22 +1955,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild2/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild2" - Language: "Wren|2.2.2" + Name: 'TestBuild2' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -1980,14 +1980,14 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } - "User1|TestBuild": { Version: "3.3.3", Tool: "Tool0" } + 'User1|Soup.Cpp': { Version: '1.1.1' } + 'User1|TestBuild': { Version: '3.3.3', Tool: 'Tool0' } } } Tool0: {} @@ -2001,13 +2001,13 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild": { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } - "User1|TestBuild2": { Version: "3.3.3", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild': { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } + 'User1|TestBuild2': { Version: '3.3.3', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -2255,11 +2255,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "User1|TestBuild@3.3.3" + 'User1|TestBuild@3.3.3' ] } )"))); @@ -2267,11 +2267,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' Dependencies: { Build: [ - "TestBuild2@4.4.4" + 'TestBuild2@4.4.4' ] } )"))); @@ -2279,22 +2279,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild2/4.4.4/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild2" - Language: "Wren|2.2.2" + Name: 'TestBuild2' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -2304,14 +2304,14 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } - "User1|TestBuild": { Version: "3.3.3", Tool: "Tool0" } + 'User1|Soup.Cpp': { Version: '1.1.1' } + 'User1|TestBuild': { Version: '3.3.3', Tool: 'Tool0' } } } Tool0: {} @@ -2325,13 +2325,13 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild": { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild': { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } - "User1|TestBuild2": { Version: "4.4.4" } + 'User1|Soup.Wren': { Version: '2.2.2' } + 'User1|TestBuild2': { Version: '4.4.4' } } } Tool0: {} @@ -2345,12 +2345,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild2": { Version: "../TestBuild2/", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild2': { Version: '../TestBuild2/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -2610,11 +2610,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "User1|TestBuild@3.3.3" + 'User1|TestBuild@3.3.3' ] } )"))); @@ -2622,11 +2622,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|2.2.2" + Name: 'TestBuild' + Language: 'Wren|2.2.2' Dependencies: { Tool: [ - "[C++]TestTool@4.4.4" + '[C++]TestTool@4.4.4' ] } )"))); @@ -2634,22 +2634,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Cpp/User1/TestTool/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestTool" - Language: "C++|1.1.1" + Name: 'TestTool' + Language: 'C++|1.1.1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -2659,19 +2659,19 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } - "User1|TestBuild": { Version: "3.3.3", Tool: "Tool0" } + 'User1|Soup.Cpp': { Version: '1.1.1' } + 'User1|TestBuild': { Version: '3.3.3', Tool: 'Tool0' } } } Tool0: { - "C++": { - "User1|TestTool": { Version: "3.3.3" } + 'C++': { + 'User1|TestTool': { Version: '3.3.3' } } } } @@ -2684,12 +2684,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild": { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild': { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -2702,13 +2702,13 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - "User1|TestTool": { Version: "../TestTool/", Build: "Build0", Tool: "Tool0" } + 'C++': { + 'User1|TestTool': { Version: '../TestTool/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: {} @@ -2973,11 +2973,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Build: [ - "User1|TestBuild@3.3.3" + 'User1|TestBuild@3.3.3' ] } )"))); @@ -2985,29 +2985,29 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/TestBuild/3.3.4/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "TestBuild" - Language: "Wren|1" + Name: 'TestBuild' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/Soup.Wren/2.2.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|2.2.2" + Name: 'Soup.Wren' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/Soup.Cpp/1.1.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|2.2.2" + Name: 'Soup.Cpp' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -3017,14 +3017,14 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.2" } - "User1|TestBuild": { Version: "3.3.4" } + 'User1|Soup.Cpp': { Version: '1.1.2' } + 'User1|TestBuild': { Version: '3.3.4' } } } Tool0: { @@ -3038,12 +3038,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|TestBuild": { Version: "../TestBuild/", Build: "Build0", Tool: "Tool0" } + 'User1|TestBuild': { Version: '../TestBuild/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.3" } + 'User1|Soup.Wren': { Version: '2.2.3' } } } Tool0: { @@ -3058,12 +3058,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|Soup.Wren": { Version: "../Soup.Wren/", Build: "Build0", Tool: "Tool0" } + 'User1|Soup.Wren': { Version: '../Soup.Wren/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -3077,12 +3077,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|Soup.Cpp": { Version: "../Soup.Cpp/", Build: "Build0", Tool: "Tool0" } + 'User1|Soup.Cpp': { Version: '../Soup.Cpp/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -3364,11 +3364,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C#|1" + Name: 'MyPackage' + Language: 'C#|1' Dependencies: { Runtime: [ - "../Package1/" + '../Package1/' ] } )"))); @@ -3376,22 +3376,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/Package1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Package1" - Language: "C#|1" + Name: 'Package1' + Language: 'C#|1' )"))); fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Wren/User1/Soup.CSharp/2.2.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.CSharp" - Language: "Wren|2.2.2" + Name: 'Soup.CSharp' + Language: 'Wren|2.2.2' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Wren/2.2.2/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Wren" - Language: "Wren|1" + Name: 'Soup.Wren' + Language: 'Wren|1' )"))); // Create the package lock @@ -3401,14 +3401,14 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C#": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } - Package1: { Version: "../Package1/", Build: "Build0", Tool: "Tool0" } + 'C#': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } + Package1: { Version: '../Package1/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.CSharp": { Version: "2.2.3" } + 'User1|Soup.CSharp': { Version: '2.2.3' } } } Tool0: { @@ -3423,12 +3423,12 @@ namespace Soup::Core::UnitTests Closures: { Root: { Wren: { - "User1|Soup.CSharp": { Version: "../Soup.CSharp/", Build: "Build0", Tool: "Tool0" } + 'User1|Soup.CSharp': { Version: '../Soup.CSharp/', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Wren": { Version: "2.2.2" } + 'User1|Soup.Wren': { Version: '2.2.2' } } } Tool0: {} @@ -3654,37 +3654,37 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1.1.1" + Name: 'MyPackage' + Language: 'C++|1.1.1' Dependencies: { Runtime: [ - "User1|PackageA@3.3.3" - "User1|PackageB@4.4.4" + 'User1|PackageA@3.3.3' + 'User1|PackageB@4.4.4' ] } )"))); fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Cpp/User1/PackageA/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "PackageA" - Language: "C++|1.1.1" + Name: 'PackageA' + Language: 'C++|1.1.1' Dependencies: { Runtime: [ - "User1|PackageB@4.4.4" + 'User1|PackageB@4.4.4' ] } )"))); fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/Cpp/User1/PackageB/4.4.4/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "PackageB" - Language: "C++|1.1.1" + Name: 'PackageB' + Language: 'C++|1.1.1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); // Create the package lock @@ -3694,15 +3694,15 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } - "User1|PackageA": { Version: "3.3.3", Build: "Build0", Tool: "Tool0" } - "User1|PackageB": { Version: "4.4.4", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } + 'User1|PackageA': { Version: '3.3.3', Build: 'Build0', Tool: 'Tool0' } + 'User1|PackageB': { Version: '4.4.4', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Tool0: {} @@ -3917,11 +3917,11 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/WorkingDirectory/MyPackage/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' Dependencies: { Other: [ - "[C#]User1|Package1@4.4.4" + '[C#]User1|Package1@4.4.4' ] } )"))); @@ -3929,22 +3929,22 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/Users/Me/.soup/packages/CSharp/User1/Package1/4.4.4/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Package1" - Language: "C#|1" + Name: 'Package1' + Language: 'C#|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.Cpp/1.1.1/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.Cpp" - Language: "Wren|1" + Name: 'Soup.Cpp' + Language: 'Wren|1' )"))); fileSystem->CreateMockFile( Path("C:/BuiltIn/Packages/User1/Soup.CSharp/3.3.3/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "Soup.CSharp" - Language: "Wren|1" + Name: 'Soup.CSharp' + Language: 'Wren|1' )"))); // Create the package lock @@ -3954,21 +3954,21 @@ namespace Soup::Core::UnitTests Version: 5 Closures: { Root: { - "C++": { - MyPackage: { Version: "../MyPackage/", Build: "Build0", Tool: "Tool0" } + 'C++': { + MyPackage: { Version: '../MyPackage/', Build: 'Build0', Tool: 'Tool0' } } - "C#": { - "User1|Package1": { Version: "4.4.4", Build: "Build1", Tool: "Tool0" } + 'C#': { + 'User1|Package1': { Version: '4.4.4', Build: 'Build1', Tool: 'Tool0' } } } Build0: { Wren: { - "User1|Soup.Cpp": { Version: "1.1.1" } + 'User1|Soup.Cpp': { Version: '1.1.1' } } } Build1: { Wren: { - "User1|Soup.CSharp": { Version: "3.3.3" } + 'User1|Soup.CSharp': { Version: '3.3.3' } } } Tool1: { diff --git a/Source/Client/Core/UnitTests/Build/RecipeBuildLocationManagerTests.h b/Source/Client/Core/UnitTests/Build/RecipeBuildLocationManagerTests.h index fd25c5947..eb54c544e 100644 --- a/Source/Client/Core/UnitTests/Build/RecipeBuildLocationManagerTests.h +++ b/Source/Client/Core/UnitTests/Build/RecipeBuildLocationManagerTests.h @@ -16,6 +16,7 @@ namespace Soup::Core::UnitTests auto fileSystem = std::make_shared(); auto scopedFileSystem = ScopedFileSystemRegister(fileSystem); + auto packageName = Core::PackageName(std::nullopt, "MyPackage"); auto workingDirectory = Path("C:/WorkingDirectory/"); auto recipe = Recipe(RecipeTable( { @@ -34,6 +35,7 @@ namespace Soup::Core::UnitTests }); auto uut = RecipeBuildLocationManager(knownLanguages); auto targetDirectory = uut.GetOutputDirectory( + packageName, workingDirectory, recipe, globalParameters, @@ -65,9 +67,10 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("C:/RootRecipe.sml"), std::make_shared(std::stringstream(R"( - OutputRoot: "BuildOut/" + OutputRoot: 'BuildOut/' )"))); + auto packageName = Core::PackageName(std::nullopt, "MyPackage"); auto workingDirectory = Path("C:/WorkingDirectory/"); auto recipe = Recipe(RecipeTable( { @@ -86,19 +89,20 @@ namespace Soup::Core::UnitTests }); auto uut = RecipeBuildLocationManager(knownLanguages); auto targetDirectory = uut.GetOutputDirectory( + packageName, workingDirectory, recipe, globalParameters, recipeCache); - Assert::AreEqual(Path("C:/BuildOut/Cpp/MyPackage/1.2.3/J_HqSstV55vlb-x6RWC_hLRFRDU/"), targetDirectory, "Verify target directory matches expected."); + Assert::AreEqual(Path("C:/BuildOut/Cpp/Local/MyPackage/1.2.3/J_HqSstV55vlb-x6RWC_hLRFRDU/"), targetDirectory, "Verify target directory matches expected."); // Verify expected logs Assert::AreEqual( std::vector({ "INFO: Found Root Recipe: 'C:/RootRecipe.sml'", "DIAG: Load Root Recipe: C:/RootRecipe.sml", - "INFO: Override root output: C:/BuildOut/Cpp/MyPackage/1.2.3/", + "INFO: Override root output: C:/BuildOut/Cpp/Local/MyPackage/1.2.3/", }), testListener->GetMessages(), "Verify log messages match expected."); diff --git a/Source/Client/Core/UnitTests/Recipe/RecipeExtensionsTests.h b/Source/Client/Core/UnitTests/Recipe/RecipeExtensionsTests.h index 91cdde5c2..05cb982b2 100644 --- a/Source/Client/Core/UnitTests/Recipe/RecipeExtensionsTests.h +++ b/Source/Client/Core/UnitTests/Recipe/RecipeExtensionsTests.h @@ -97,8 +97,8 @@ namespace Soup::Core::UnitTests fileSystem->CreateMockFile( Path("TestFiles/SimpleRecipe/Recipe.sml"), std::make_shared(std::stringstream(R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' )"))); auto directory = Path("TestFiles/SimpleRecipe/Recipe.sml"); @@ -169,8 +169,8 @@ namespace Soup::Core::UnitTests // Verify the contents of the build file std::string expectedBuildFile = -R"(Name: "MyPackage" -Language: "C++|1" +R"(Name: 'MyPackage' +Language: 'C++|1' )"; auto mockBuildFile = fileSystem->GetMockFile(Path("TestFiles/SimpleRecipe/Recipe.sml")); Assert::AreEqual(expectedBuildFile, mockBuildFile->Content.str(), "Verify file contents."); diff --git a/Source/Client/Core/UnitTests/Recipe/RecipeSMLTests.h b/Source/Client/Core/UnitTests/Recipe/RecipeSMLTests.h index 4e8edb446..062e2e1b2 100644 --- a/Source/Client/Core/UnitTests/Recipe/RecipeSMLTests.h +++ b/Source/Client/Core/UnitTests/Recipe/RecipeSMLTests.h @@ -25,8 +25,8 @@ namespace Soup::Core::UnitTests auto recipeFile = Path("Recipe.sml"); auto recipe = std::stringstream( R"( - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' )"); auto actual = Recipe(RecipeSML::Deserialize(recipeFile, recipe)); @@ -46,8 +46,8 @@ namespace Soup::Core::UnitTests auto recipe = std::stringstream( R"( # This is an awesome project - Name: "MyPackage" - Language: "C++|1" + Name: 'MyPackage' + Language: 'C++|1' )"); auto actual = Recipe(RecipeSML::Deserialize(recipeFile, recipe)); @@ -66,9 +66,9 @@ namespace Soup::Core::UnitTests auto recipeFile = Path("Recipe.sml"); auto recipe = std::stringstream( R"( - Name: "MyPackage" - Language: "C++|1" - Version: "1.2.3" + Name: 'MyPackage' + Language: 'C++|1' + Version: '1.2.3' Dependencies: { Runtime: [] Build: [] @@ -110,8 +110,8 @@ namespace Soup::Core::UnitTests RecipeSML::Serialize(recipe.GetTable(), actual); auto expected = -R"(Name: "MyPackage" -Language: "C++|1" +R"(Name: 'MyPackage' +Language: 'C++|1' )"; Assert::AreEqual(expected, actual.str(), "Verify matches expected."); @@ -141,9 +141,9 @@ Language: "C++|1" RecipeSML::Serialize(recipe.GetTable(), actual); auto expected = -R"(Name: "MyPackage" -Language: "C++|1" -Version: "1.2.3" +R"(Name: 'MyPackage' +Language: 'C++|1' +Version: '1.2.3' Dependencies: {Build: [] Runtime: [] Test: [] diff --git a/Source/Client/Tools/PackageLock.sml b/Source/Client/Tools/PackageLock.sml index 08143adb1..b73965cc3 100644 --- a/Source/Client/Tools/PackageLock.sml +++ b/Source/Client/Tools/PackageLock.sml @@ -1,28 +1,35 @@ Version: 5 Closures: { Root: { - "C++": { - "Monitor.Host": { Version: "../../Monitor/Host/", Build: "Build0", Tool: "Tool0" } - "Monitor.Shared": { Version: "../../Monitor/Shared/", Build: "Build0", Tool: "Tool0" } - "mwasplund|CryptoPP": { Version: "1.2.1", Build: "Build0", Tool: "Tool0" } - "mwasplund|Detours": { Version: "4.0.11", Build: "Build0", Tool: "Tool0" } - "mwasplund|json11": { Version: "1.1.0", Build: "Build0", Tool: "Tool0" } - "mwasplund|Opal": { Version: "0.9.5", Build: "Build0", Tool: "Tool0" } - "mwasplund|reflex": { Version: "1.0.3", Build: "Build0", Tool: "Tool0" } - "mwasplund|wren": { Version: "1.0.4", Build: "Build0", Tool: "Tool0" } - "Soup.Core": { Version: "../Core/", Build: "Build0", Tool: "Tool0" } - SoupTools: { Version: "../Tools", Build: "Build0", Tool: "Tool0" } + 'C++': { + 'Monitor.Host': { Version: '../../Monitor/Host/', Build: 'Build0', Tool: 'Tool0' } + 'Monitor.Shared': { Version: '../../Monitor/Shared/', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|CryptoPP': { Version: '1.2.1', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Detours': { Version: '4.0.11', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|json11': { Version: '1.1.1', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Opal': { Version: '0.10.0', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|reflex': { Version: '1.0.4', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Soup.Test.Assert': { Version: '0.4.0', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|wren': { Version: '1.0.4', Build: 'Build0', Tool: 'Tool0' } + 'Soup.Core': { Version: '../Core/', Build: 'Build1', Tool: 'Tool0' } + SoupTools: { Version: '../Tools', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.Cpp": { Version: "0.11.0" } + 'mwasplund|Soup.Cpp': { Version: '0.12.0' } + } + } + Build1: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: '0.12.0' } + 'mwasplund|Soup.Test.Cpp': { Version: '0.11.0' } } } Tool0: { - "C++": { - "mwasplund|copy": { Version: "1.0.0" } - "mwasplund|mkdir": { Version: "1.0.0" } + 'C++': { + 'mwasplund|copy': { Version: '1.0.0' } + 'mwasplund|mkdir': { Version: '1.0.0' } } } } \ No newline at end of file diff --git a/Source/Client/Tools/Recipe.sml b/Source/Client/Tools/Recipe.sml index 703ca076e..62becc2f2 100644 --- a/Source/Client/Tools/Recipe.sml +++ b/Source/Client/Tools/Recipe.sml @@ -1,14 +1,14 @@ -Name: "SoupTools" -Language: "C++|0" -Version: "1.0.0" +Name: 'SoupTools' +Language: 'C++|0' +Version: '1.0.0' Source: [ - "Public.cpp" + 'Public.cpp' ] -Type: "DynamicLibrary" +Type: 'DynamicLibrary' Dependencies: { Runtime: [ - "../Core/" - "mwasplund|json11@1" + '../Core/' + 'mwasplund|json11@1' ] } \ No newline at end of file diff --git a/Source/Generate/PackageLock.sml b/Source/Generate/PackageLock.sml index f290b095e..64b443bd5 100644 --- a/Source/Generate/PackageLock.sml +++ b/Source/Generate/PackageLock.sml @@ -16,7 +16,7 @@ Closures: { } Build0: { Wren: [ - { Name: "Soup.Cpp", Version: "0.10.1" } + { Name: "Soup.Cpp", Version: "0.12.0" } ] } Tool0: { diff --git a/Source/Generate/Recipe.sml b/Source/Generate/Recipe.sml index c8b6bc434..44ee25f2c 100644 --- a/Source/Generate/Recipe.sml +++ b/Source/Generate/Recipe.sml @@ -1,14 +1,14 @@ -Name: "Soup.Generate" -Language: "C++|0.4" -Type: "Executable" -Version: "1.0.0" +Name: 'Soup.Generate' +Language: 'C++|0' +Type: 'Executable' +Version: '1.0.0' Source: [ - "Main.cpp" + 'Main.cpp' ] Dependencies: { Runtime: [ - "../Client/Core/" - "mwasplund|wren@1" - "mwasplund|Opal@0" + '../Client/Core/' + 'mwasplund|wren@1' + 'mwasplund|Opal@0' ] } \ No newline at end of file diff --git a/Source/GenerateSharp/PackageManager.Core/ClosureManager.cs b/Source/GenerateSharp/PackageManager.Core/ClosureManager.cs index 6619c1b47..4d86adc56 100644 --- a/Source/GenerateSharp/PackageManager.Core/ClosureManager.cs +++ b/Source/GenerateSharp/PackageManager.Core/ClosureManager.cs @@ -24,8 +24,6 @@ public class ClosureManager : IClosureManager private const string BuiltInLanguageCSharp = "C#"; private const string BuiltInLanguageCpp = "C++"; private const string BuiltInLanguageWren = "Wren"; - private const string BuiltInLanguagePackageCSharp = "Soup.CSharp"; - private const string BuiltInLanguagePackageCpp = "Soup.Cpp"; private const string BuiltInLanguagePackageWren = "Soup.Wren"; private const string BuiltInLanguageSafeNameCSharp = "CSharp"; private const string BuiltInLanguageSafeNameCpp = "Cpp"; @@ -38,21 +36,15 @@ public class ClosureManager : IClosureManager private readonly HttpClient _httpClient; - private readonly SemanticVersion _builtInLanguageVersionCSharp; - private readonly SemanticVersion _builtInLanguageVersionCpp; private readonly SemanticVersion _builtInLanguageVersionWren; public ClosureManager( Uri apiEndpoint, HttpClient httpClient, - SemanticVersion builtInLanguageVersionCSharp, - SemanticVersion builtInLanguageVersionCpp, SemanticVersion builtInLanguageVersionWren) { _apiEndpoint = apiEndpoint; _httpClient = httpClient; - _builtInLanguageVersionCSharp = builtInLanguageVersionCSharp; - _builtInLanguageVersionCpp = builtInLanguageVersionCpp; _builtInLanguageVersionWren = builtInLanguageVersionWren; } @@ -139,9 +131,7 @@ private async Task CheckGenerateAndRestoreSubGraphDependencyLocksAsync( { // Check if the package version already exists if (projectName.HasOwner && projectName.Owner == BuiltInOwner && - ((projectName.Name == BuiltInLanguagePackageCpp && version == _builtInLanguageVersionCpp) || - (projectName.Name == BuiltInLanguagePackageCSharp && version == _builtInLanguageVersionCSharp) || - (projectName.Name == BuiltInLanguagePackageWren && version == _builtInLanguageVersionWren))) + projectName.Name == BuiltInLanguagePackageWren && version == _builtInLanguageVersionWren) { Log.HighPriority("Skip built in language version in build closure"); } @@ -273,30 +263,6 @@ private async Task EnsurePackageLockAsync( // Request the built in versions for the language extensions var preferredVersions = new List { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = BuiltInLanguageWren, - Owner = BuiltInOwner, - Name = BuiltInLanguagePackageCSharp, - Version = new Api.Client.SemanticVersionExactModel() - { - Major = _builtInLanguageVersionCSharp.Major, - Minor = _builtInLanguageVersionCSharp.Minor ?? throw new InvalidOperationException("Built In Language must be fully resolved"), - Patch = _builtInLanguageVersionCSharp.Patch ?? throw new InvalidOperationException("Built In Language must be fully resolved"), - }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = BuiltInLanguageWren, - Owner = BuiltInOwner, - Name = BuiltInLanguagePackageCpp, - Version = new Api.Client.SemanticVersionExactModel() - { - Major = _builtInLanguageVersionCpp.Major, - Minor = _builtInLanguageVersionCpp.Minor ?? throw new InvalidOperationException("Built In Language must be fully resolved"), - Patch = _builtInLanguageVersionCpp.Patch ?? throw new InvalidOperationException("Built In Language must be fully resolved"), - }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = BuiltInLanguageWren, @@ -820,9 +786,7 @@ private async Task EnsurePackageDownloadedAsync( // Check if the package version already exists if (!isRuntime && - ((packageName == BuiltInLanguagePackageCpp && packageVersion == _builtInLanguageVersionCpp) || - (packageName == BuiltInLanguagePackageCSharp && packageVersion == _builtInLanguageVersionCSharp) || - (packageName == BuiltInLanguagePackageWren && packageVersion == _builtInLanguageVersionWren))) + packageName == BuiltInLanguagePackageWren && packageVersion == _builtInLanguageVersionWren) { Log.HighPriority("Skip built in language version in build closure"); } diff --git a/Source/GenerateSharp/PackageManager.UnitTests/ClosureManagerUnitTests.cs b/Source/GenerateSharp/PackageManager.UnitTests/ClosureManagerUnitTests.cs index aa6288734..7c9b6f5cc 100644 --- a/Source/GenerateSharp/PackageManager.UnitTests/ClosureManagerUnitTests.cs +++ b/Source/GenerateSharp/PackageManager.UnitTests/ClosureManagerUnitTests.cs @@ -33,10 +33,10 @@ public async Task RestorePackagesAsync_NoDependencies() new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - """)))); + Name: 'MyPackage' + Language: 'Wren|3.2.1' + Version: '1.0.0' + """)))); // Mock out the http var mockMessageHandler = new Mock(); @@ -65,10 +65,10 @@ public async Task RestorePackagesAsync_NoDependencies() { Public = new Api.Client.PackagePublicExactReferenceModel() { - Name = "Soup.Cpp", + Name = "Soup.Wren", Owner = "mwasplund", Language = "Wren", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionExactModel() { Major = 4, Minor = 5, Patch = 6, }, } }, } @@ -87,7 +87,7 @@ public async Task RestorePackagesAsync_NoDependencies() HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":1,"language":{"name":"Wren","version":{"major":3,"minor":2,"patch":1}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult)), @@ -96,8 +96,6 @@ public async Task RestorePackagesAsync_NoDependencies() var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -116,18 +114,17 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/Root/MyPackage/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:C++ MyPackage -> ./", - "DIAG: Build0:Wren mwasplund|Soup.Cpp -> 3.2.1", + "DIAG: Root:Wren MyPackage -> ./", + "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "INFO: Restore Packages for Closure Root", - "INFO: Restore Packages for Language C++", + "INFO: Restore Packages for Language Wren", "INFO: Skip Package: MyPackage -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", - "HIGH: Install Package: Wren mwasplund Soup.Cpp@3.2.1", + "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", "HIGH: Skip built in language version in build closure", "INFO: Restore Packages for Closure Tool0", "HIGH: Skip built in language version in build closure", - }, testListener.Messages); @@ -150,7 +147,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Id = 1, Language = new Api.Client.LanguageReferenceModel() { - Name = "C++", + Name = "Wren", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, } }, Dependencies = new Dictionary>(), @@ -159,20 +156,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -200,23 +183,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var packageLockContent = await reader.ReadToEndAsync(); var expected = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Cpp": { Version: "3.2.1" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expected, packageLockContent); } @@ -236,16 +219,16 @@ public async Task RestorePackagesAsync_HasDependencies_GenerateClosureRequestFai new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - Dependencies: { - Runtime: [ - { Reference: "User1|Package1@1.2.3" } - { Reference: "User1|Package2@3.2.1" } - ] - } - """)))); + Name: 'MyPackage' + Language: 'Wren|3.2.1' + Version: '1.0.0' + Dependencies: { + Runtime: [ + { Reference: 'User1|Package1@1.2.3' } + { Reference: 'User1|Package2@3.2.1' } + ] + } + """)))); // Mock out the http var mockMessageHandler = new Mock(); @@ -262,7 +245,7 @@ public async Task RestorePackagesAsync_HasDependencies_GenerateClosureRequestFai HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":3,"language":{"name":"Wren","version":{"major":3,"minor":2,"patch":1}},"dependencies":{"Runtime":[1,2]}},"localPackages":[],"publicPackages":[{"id":1,"language":"Wren","owner":"User1","name":"Package1","version":{"major":1,"minor":2,"patch":3}},{"id":2,"language":"Wren","owner":"User1","name":"Package2","version":{"major":3,"minor":2,"patch":1}}],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult)), @@ -270,14 +253,14 @@ public async Task RestorePackagesAsync_HasDependencies_GenerateClosureRequestFai _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package1/versions/1.2.3/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package1/versions/1.2.3/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package2/versions/3.2.1/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package2/versions/3.2.1/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); @@ -285,8 +268,6 @@ public async Task RestorePackagesAsync_HasDependencies_GenerateClosureRequestFai var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); _ = await Assert.ThrowsAsync(async () => @@ -330,7 +311,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Id = 3, Language = new Api.Client.LanguageReferenceModel() { - Name = "C++", + Name = "Wren", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, } }, Dependencies = new Dictionary>() @@ -351,7 +332,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( new Api.Client.PackagePublicReferenceModel() { Id = 1, - Language = "C++", + Language = "Wren", Owner = "User1", Name = "Package1", Version = new Api.Client.SemanticVersionModel() { Major = 1, Minor = 2, Patch = 3, }, @@ -359,7 +340,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( new Api.Client.PackagePublicReferenceModel() { Id = 2, - Language = "C++", + Language = "Wren", Owner = "User1", Name = "Package2", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, @@ -367,20 +348,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( }, PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -417,16 +384,16 @@ public async Task RestorePackagesAsync_HasDependencies() new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - Dependencies: { - Runtime: [ - { Reference: "User1|Package1@1.2.3" } - { Reference: "User1|Package2@3.2.1" } - ] - } - """)))); + Name: 'MyPackage' + Language: 'Wren|3.2.1' + Version: '1.0.0' + Dependencies: { + Runtime: [ + { Reference: 'User1|Package1@1.2.3' } + { Reference: 'User1|Package2@3.2.1' } + ] + } + """)))); // Setup the mock zip manager var mockZipManager = new Mock(); @@ -454,7 +421,7 @@ public async Task RestorePackagesAsync_HasDependencies() { Name = "Package1", Owner = "User1", - Language = "C++", + Language = "Wren", Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, }, Build = "Build0", @@ -466,7 +433,7 @@ public async Task RestorePackagesAsync_HasDependencies() { Name = "Package2", Owner = "User1", - Language = "C++", + Language = "Wren", Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, }, Build = "Build0", @@ -483,10 +450,10 @@ public async Task RestorePackagesAsync_HasDependencies() { Public = new Api.Client.PackagePublicExactReferenceModel() { - Name = "Soup.Cpp", + Name = "Soup.Wren", Owner = "mwasplund", Language = "Wren", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionExactModel() { Major = 4, Minor = 5, Patch = 6, }, } }, } @@ -505,7 +472,7 @@ public async Task RestorePackagesAsync_HasDependencies() HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":3,"language":{"name":"Wren","version":{"major":3,"minor":2,"patch":1}},"dependencies":{"Runtime":[1,2]}},"localPackages":[],"publicPackages":[{"id":1,"language":"Wren","owner":"User1","name":"Package1","version":{"major":1,"minor":2,"patch":3}},{"id":2,"language":"Wren","owner":"User1","name":"Package2","version":{"major":3,"minor":2,"patch":1}}],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult)), @@ -513,14 +480,14 @@ public async Task RestorePackagesAsync_HasDependencies() _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package1/versions/1.2.3/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package1/versions/1.2.3/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package2/versions/3.2.1/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package2/versions/3.2.1/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); @@ -528,8 +495,6 @@ public async Task RestorePackagesAsync_HasDependencies() var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -548,23 +513,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/Root/MyPackage/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:C++ MyPackage -> ./", - "DIAG: Root:C++ User1|Package1 -> 1.2.3", - "DIAG: Root:C++ User1|Package2 -> 3.2.1", - "DIAG: Build0:Wren mwasplund|Soup.Cpp -> 3.2.1", + "DIAG: Root:Wren MyPackage -> ./", + "DIAG: Root:Wren User1|Package1 -> 1.2.3", + "DIAG: Root:Wren User1|Package2 -> 3.2.1", + "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "INFO: Restore Packages for Closure Root", - "INFO: Restore Packages for Language C++", + "INFO: Restore Packages for Language Wren", "INFO: Skip Package: MyPackage -> ./", - "HIGH: Install Package: C++ User1 Package1@1.2.3", + "HIGH: Install Package: Wren User1 Package1@1.2.3", "HIGH: Downloading package", - "HIGH: Install Package: C++ User1 Package2@3.2.1", + "HIGH: Install Package: Wren User1 Package2@3.2.1", "HIGH: Downloading package", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", - "HIGH: Install Package: Wren mwasplund Soup.Cpp@3.2.1", + "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", "HIGH: Skip built in language version in build closure", "INFO: Restore Packages for Closure Tool0", - "HIGH: Skip built in language version in build closure" + "HIGH: Skip built in language version in build closure", }, testListener.Messages); @@ -576,31 +541,31 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "Exists: C:/Root/MyPackage/Recipe.sml", "OpenRead: C:/Root/MyPackage/Recipe.sml", "OpenWriteTruncate: C:/Root/MyPackage/PackageLock.sml", - "Exists: C:/PackageStore/Cpp/User1/Package1/1.2.3/", + "Exists: C:/PackageStore/Wren/User1/Package1/1.2.3/", "OpenWriteTruncate: C:/Staging/Package1.zip", - "CreateDirectory: C:/Staging/C++_Package1_1.2.3/", + "CreateDirectory: C:/Staging/Wren_Package1_1.2.3/", "DeleteFile: C:/Staging/Package1.zip", - "Exists: C:/PackageStore/Cpp/User1/Package1", - "CreateDirectory: C:/PackageStore/Cpp/User1/Package1", - "Rename: [C:/Staging/C++_Package1_1.2.3/] -> [C:/PackageStore/Cpp/User1/Package1/1.2.3/]", - "Exists: C:/PackageStore/Cpp/User1/Package2/3.2.1/", + "Exists: C:/PackageStore/Wren/User1/Package1", + "CreateDirectory: C:/PackageStore/Wren/User1/Package1", + "Rename: [C:/Staging/Wren_Package1_1.2.3/] -> [C:/PackageStore/Wren/User1/Package1/1.2.3/]", + "Exists: C:/PackageStore/Wren/User1/Package2/3.2.1/", "OpenWriteTruncate: C:/Staging/Package2.zip", - "CreateDirectory: C:/Staging/C++_Package2_3.2.1/", + "CreateDirectory: C:/Staging/Wren_Package2_3.2.1/", "DeleteFile: C:/Staging/Package2.zip", - "Exists: C:/PackageStore/Cpp/User1/Package2", - "CreateDirectory: C:/PackageStore/Cpp/User1/Package2", - "Rename: [C:/Staging/C++_Package2_3.2.1/] -> [C:/PackageStore/Cpp/User1/Package2/3.2.1/]", + "Exists: C:/PackageStore/Wren/User1/Package2", + "CreateDirectory: C:/PackageStore/Wren/User1/Package2", + "Rename: [C:/Staging/Wren_Package2_3.2.1/] -> [C:/PackageStore/Wren/User1/Package2/3.2.1/]", }, mockFileSystem.Requests); // Verify zip requests mockZipManager.Verify(zip => zip.ExtractToDirectory( new Path("C:/Staging/Package1.zip"), - new Path("C:/Staging/C++_Package1_1.2.3/")), + new Path("C:/Staging/Wren_Package1_1.2.3/")), Times.Once()); mockZipManager.Verify(zip => zip.ExtractToDirectory( new Path("C:/Staging/Package2.zip"), - new Path("C:/Staging/C++_Package2_3.2.1/")), + new Path("C:/Staging/Wren_Package2_3.2.1/")), Times.Once()); mockZipManager.VerifyNoOtherCalls(); @@ -612,7 +577,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Id = 3, Language = new Api.Client.LanguageReferenceModel() { - Name = "C++", + Name = "Wren", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, }, Dependencies = new Dictionary>() @@ -633,7 +598,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( new Api.Client.PackagePublicReferenceModel() { Id = 1, - Language = "C++", + Language = "Wren", Owner = "User1", Name = "Package1", Version = new Api.Client.SemanticVersionModel() { Major = 1, Minor = 2, Patch = 3, }, @@ -641,7 +606,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( new Api.Client.PackagePublicReferenceModel() { Id = 2, - Language = "C++", + Language = "Wren", Owner = "User1", Name = "Package2", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, @@ -649,20 +614,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( }, PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -683,14 +634,14 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( mockMessageHandler.Verify(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package1/versions/1.2.3/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package1/versions/1.2.3/download"), "{Accept: [application/json]}", null), Times.Once()); mockMessageHandler.Verify(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package2/versions/3.2.1/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package2/versions/3.2.1/download"), "{Accept: [application/json]}", null), Times.Once()); @@ -704,25 +655,25 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var packageLockContent = await reader.ReadToEndAsync(); var expected = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - "User1|Package1": { Version: "1.2.3", Build: "Build0", Tool: "Tool0" } - "User1|Package2": { Version: "3.2.1", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } + 'User1|Package1': { Version: '1.2.3', Build: 'Build0', Tool: 'Tool0' } + 'User1|Package2': { Version: '3.2.1', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Cpp": { Version: "3.2.1" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expected, packageLockContent); } @@ -742,33 +693,33 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies() new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|5" - Version: "1.0.0" - Dependencies: { - Build: [ - { Reference: "User1|Package1@1.2.3" } - ] - } - """)))); + Name: 'MyPackage' + Language: 'C++|5' + Version: '1.0.0' + Dependencies: { + Build: [ + { Reference: 'User1|Package1@1.2.3' } + ] + } + """)))); mockFileSystem.CreateMockFile( new Path("C:/PackageStore/Wren/User1/Package1/1.2.3/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package1" - Language: "Wren|4" - Version: "1.2.3" - """)))); + Name: 'Package1' + Language: 'Wren|4' + Version: '1.2.3' + """)))); mockFileSystem.CreateMockFile( new Path("C:/PackageStore/Wren/mwasplund/Soup.Cpp/5.0.0/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Soup.Cpp" - Language: "Wren|4" - Version: "5.0.0" - """)))); + Name: 'Soup.Cpp' + Language: 'Wren|4' + Version: '5.0.0' + """)))); // Setup the mock zip manager var mockZipManager = new Mock(); @@ -872,11 +823,17 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies() HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":2,"language":{"name":"C\u002B\u002B","version":{"major":5}},"dependencies":{"Build":[1]}},"localPackages":[],"publicPackages":[{"id":1,"language":"Wren","owner":"User1","name":"Package1","version":{"major":1,"minor":2,"patch":3}}],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult1)), - }) + }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":1,"language":{"name":"Wren","version":{"major":4}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult2)), @@ -910,8 +867,6 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies() var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -950,11 +905,11 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/PackageStore/Wren/mwasplund/Soup.Cpp/5.0.0/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:Wren Soup.Cpp -> ./", + "DIAG: Root:Wren mwasplund|Soup.Cpp -> ./", "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "INFO: Restore Packages for Closure Root", "INFO: Restore Packages for Language Wren", - "INFO: Skip Package: Soup.Cpp -> ./", + "INFO: Skip Package: mwasplund|Soup.Cpp -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", @@ -968,11 +923,11 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/PackageStore/Wren/User1/Package1/1.2.3/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:Wren Package1 -> ./", + "DIAG: Root:Wren User1|Package1 -> ./", "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "INFO: Restore Packages for Closure Root", "INFO: Restore Packages for Language Wren", - "INFO: Skip Package: Package1 -> ./", + "INFO: Skip Package: User1|Package1 -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", @@ -1066,20 +1021,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( }, PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -1114,20 +1055,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -1170,24 +1097,24 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var myPackageLockContent = await myPackageLockReader.ReadToEndAsync(); var expectedMyPackageLock = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + 'C++': { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Cpp": { Version: "5.0.0" } - "User1|Package1": { Version: "1.2.3" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: '5.0.0' } + 'User1|Package1': { Version: '1.2.3' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedMyPackageLock, myPackageLockContent); @@ -1197,23 +1124,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var package1LockContent = await readerPackage1Lock.ReadToEndAsync(); var expectedPackage1Lock = """ - Version: 5 - Closures: { - Root: { - Wren: { - Package1: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + 'User1|Package1': { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Wren": { Version: "4.5.6" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedPackage1Lock, package1LockContent); @@ -1223,23 +1150,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var soupCppLockContent = await readerSoupCppLock.ReadToEndAsync(); var expectedSoupCppLock = """ - Version: 5 - Closures: { - Root: { - Wren: { - "Soup.Cpp": { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Wren": { Version: "4.5.6" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedSoupCppLock, soupCppLockContent); } @@ -1259,47 +1186,47 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies_WithToolDepend new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|5" - Version: "1.0.0" - Dependencies: { - Build: [ - { Reference: "User1|Package1@1.2.3" } - ] - } - """)))); + Name: 'MyPackage' + Language: 'C++|5' + Version: '1.0.0' + Dependencies: { + Build: [ + { Reference: 'User1|Package1@1.2.3' } + ] + } + """)))); mockFileSystem.CreateMockFile( new Path("C:/PackageStore/Wren/User1/Package1/1.2.3/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package1" - Language: "Wren|6" - Version: "1.2.3" - Dependencies: { - Tool: [ - { Reference: "[C++]User1|Package2@2.3.4" } - ] - } - """)))); + Name: 'Package1' + Language: 'Wren|6' + Version: '1.2.3' + Dependencies: { + Tool: [ + { Reference: '[C++]User1|Package2@2.3.4' } + ] + } + """)))); mockFileSystem.CreateMockFile( new Path("C:/PackageStore/Cpp/User1/Package2/2.3.4/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package2" - Language: "C++|5" - Version: "2.3.4" - """)))); + Name: 'Package2' + Language: 'C++|5' + Version: '2.3.4' + """)))); mockFileSystem.CreateMockFile( new Path("C:/PackageStore/Wren/mwasplund/Soup.Cpp/5.0.0/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Soup.Cpp" - Language: "Wren|4.5.6" - Version: "5.0.0" - """)))); + Name: 'Soup.Cpp' + Language: 'Wren|4.5.6' + Version: '5.0.0' + """)))); // Setup the mock zip manager var mockZipManager = new Mock(); @@ -1474,7 +1401,7 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies_WithToolDepend Name = "Soup.Cpp", Owner = "mwasplund", Language = "Wren", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionExactModel() { Major = 5, Minor = 0, Patch = 0, }, } }, } @@ -1493,19 +1420,37 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies_WithToolDepend HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":2,"language":{"name":"C\u002B\u002B","version":{"major":5}},"dependencies":{"Build":[1]}},"localPackages":[],"publicPackages":[{"id":1,"language":"Wren","owner":"User1","name":"Package1","version":{"major":1,"minor":2,"patch":3}}],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult1)), - }) + }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":1,"language":{"name":"Wren","version":{"major":4,"minor":5,"patch":6}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult2)), - }) + }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":2,"language":{"name":"Wren","version":{"major":6}},"dependencies":{"Tool":[1]}},"localPackages":[],"publicPackages":[{"id":1,"language":"C\u002B\u002B","owner":"User1","name":"Package2","version":{"major":2,"minor":3,"patch":4}}],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult3)), - }) + }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":1,"language":{"name":"C\u002B\u002B","version":{"major":5}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult4)), @@ -1542,8 +1487,6 @@ public async Task RestorePackagesAsync_HasPublicBuildDependencies_WithToolDepend var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -1582,11 +1525,11 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/PackageStore/Wren/mwasplund/Soup.Cpp/5.0.0/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:Wren Soup.Cpp -> ./", + "DIAG: Root:Wren mwasplund|Soup.Cpp -> ./", "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "INFO: Restore Packages for Closure Root", "INFO: Restore Packages for Language Wren", - "INFO: Skip Package: Soup.Cpp -> ./", + "INFO: Skip Package: mwasplund|Soup.Cpp -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", @@ -1600,12 +1543,12 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/PackageStore/Wren/User1/Package1/1.2.3/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:Wren Package1 -> ./", + "DIAG: Root:Wren User1|Package1 -> ./", "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "DIAG: Tool0:C++ User1|Package2 -> 2.3.4", "INFO: Restore Packages for Closure Root", "INFO: Restore Packages for Language Wren", - "INFO: Skip Package: Package1 -> ./", + "INFO: Skip Package: User1|Package1 -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", @@ -1622,17 +1565,18 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "INFO: Discovering full closure", "DIAG: Load Recipe: C:/PackageStore/Cpp/User1/Package2/2.3.4/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:C++ Package2 -> ./", - "DIAG: Build0:Wren mwasplund|Soup.Cpp -> 3.2.1", + "DIAG: Root:C++ User1|Package2 -> ./", + "DIAG: Build0:Wren mwasplund|Soup.Cpp -> 5.0.0", "INFO: Restore Packages for Closure Root", "INFO: Restore Packages for Language C++", - "INFO: Skip Package: Package2 -> ./", + "INFO: Skip Package: User1|Package2 -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", - "HIGH: Install Package: Wren mwasplund Soup.Cpp@3.2.1", - "HIGH: Skip built in language version in build closure", + "HIGH: Install Package: Wren mwasplund Soup.Cpp@5.0.0", + "HIGH: Found local version", "INFO: Restore Packages for Closure Tool0", - "HIGH: Skip built in language version in build closure", + "DIAG: Create Directory: C:/LockStore/Wren/mwasplund/Soup.Cpp/5.0.0/", + "INFO: Root already processed", }, testListener.Messages); @@ -1683,6 +1627,9 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "Exists: C:/PackageStore/Cpp/User1/Package2/2.3.4/Recipe.sml", "OpenRead: C:/PackageStore/Cpp/User1/Package2/2.3.4/Recipe.sml", "OpenWriteTruncate: C:/LockStore/Cpp/User1/Package2/2.3.4/PackageLock.sml", + "Exists: C:/PackageStore/Wren/mwasplund/Soup.Cpp/5.0.0/", + "Exists: C:/LockStore/Wren/mwasplund/Soup.Cpp/5.0.0/", + "CreateDirectory: C:/LockStore/Wren/mwasplund/Soup.Cpp/5.0.0/", }, mockFileSystem.Requests); @@ -1737,20 +1684,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( }, PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -1785,20 +1718,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -1852,20 +1771,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( }, PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -1900,20 +1805,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -1963,24 +1854,24 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var myPackageLockContent = await readerMyPackageLock.ReadToEndAsync(); var expectedMyPackageLock = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + 'C++': { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Cpp": { Version: "5.0.0" } - "User1|Package1": { Version: "1.2.3" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: '5.0.0' } + 'User1|Package1': { Version: '1.2.3' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedMyPackageLock, myPackageLockContent); @@ -1990,25 +1881,25 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var package1LockContent = await readerPackage1Lock.ReadToEndAsync(); var expectedPackage1Lock = """ - Version: 5 - Closures: { - Root: { - Wren: { - Package1: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + 'User1|Package1': { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Wren": { Version: "4.5.6" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { - "C++": { - "User1|Package2": { Version: "2.3.4" } - } + } + Tool0: { + 'C++': { + 'User1|Package2': { Version: '2.3.4' } } } - """; + } + """; Assert.Equal(expectedPackage1Lock, package1LockContent); @@ -2018,23 +1909,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var package2LockContent = await readerPackage2Lock.ReadToEndAsync(); var expectedPackage2Lock = """ - Version: 5 - Closures: { - Root: { - "C++": { - Package2: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + 'C++': { + 'User1|Package2': { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Cpp": { Version: "3.2.1" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: '5.0.0' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedPackage2Lock, package2LockContent); @@ -2044,23 +1935,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var soupCppLockContent = await readerSoupCppLock.ReadToEndAsync(); var expectedSoupCppLock = """ - Version: 5 - Closures: { - Root: { - Wren: { - "Soup.Cpp": { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + 'mwasplund|Soup.Cpp': { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Wren": { Version: "4.5.6" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedSoupCppLock, soupCppLockContent); } @@ -2080,24 +1971,24 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency() new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - Dependencies: { - Build: [ - { Reference: "../Package1/" } - ] - } - """)))); + Name: 'MyPackage' + Language: 'Wren|3.2.1' + Version: '1.0.0' + Dependencies: { + Build: [ + { Reference: '../Package1/' } + ] + } + """)))); mockFileSystem.CreateMockFile( new Path("C:/Root/Package1/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package1" - Language: "Wren|4.5.6" - Version: "1.2.3" - """)))); + Name: 'Package1' + Language: 'Wren|4.5.6' + Version: '1.2.3' + """)))); // Mock out the http var mockMessageHandler = new Mock(); @@ -2126,10 +2017,10 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency() { Public = new Api.Client.PackagePublicExactReferenceModel() { - Name = "Soup.Cpp", + Name = "Soup.Wren", Owner = "mwasplund", Language = "Wren", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionExactModel() { Major = 4, Minor = 5, Patch = 6, }, } }, new Api.Client.PackageLocalOrPublicExactReferenceModel() @@ -2191,7 +2082,7 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency() HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":2,"language":{"name":"Wren","version":{"major":3,"minor":2,"patch":1}},"dependencies":{"Build":[1]}},"localPackages":[{"id":1,"language":{"name":"Wren","version":{"major":4,"minor":5,"patch":6}},"dependencies":{}}],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult1)), @@ -2201,11 +2092,20 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency() Content = new StringContent(JsonSerializer.Serialize(generateClosureResult2)), }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":1,"language":{"name":"Wren","version":{"major":4,"minor":5,"patch":6}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) + .Returns(() => new HttpResponseMessage() + { + Content = new StringContent(JsonSerializer.Serialize(generateClosureResult2)), + }); + var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -2225,15 +2125,15 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "DIAG: Load Recipe: C:/Root/MyPackage/Recipe.sml", "DIAG: Load Recipe: C:/Root/Package1/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:C++ MyPackage -> ./", - "DIAG: Build0:Wren mwasplund|Soup.Cpp -> 3.2.1", + "DIAG: Root:Wren MyPackage -> ./", + "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "DIAG: Build0:Wren Package1 -> ../Package1/", "INFO: Restore Packages for Closure Root", - "INFO: Restore Packages for Language C++", + "INFO: Restore Packages for Language Wren", "INFO: Skip Package: MyPackage -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", - "HIGH: Install Package: Wren mwasplund Soup.Cpp@3.2.1", + "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", "HIGH: Skip built in language version in build closure", "INFO: Skip Package: Package1 -> ../Package1/", "INFO: Restore Packages for Closure Tool0", @@ -2254,7 +2154,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", "HIGH: Skip built in language version in build closure", "INFO: Restore Packages for Closure Tool0", - "HIGH: Skip built in language version in build closure" + "HIGH: Skip built in language version in build closure", }, testListener.Messages); @@ -2283,7 +2183,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Id = 2, Language = new Api.Client.LanguageReferenceModel() { - Name = "C++", + Name = "Wren", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, }, Dependencies = new Dictionary>() @@ -2313,20 +2213,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -2361,20 +2247,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -2402,24 +2274,24 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var packageLockContent1 = await reader1.ReadToEndAsync(); var expectedPackageLock1 = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Cpp": { Version: "3.2.1" } - Package1: { Version: "../Package1/" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } + Package1: { Version: '../Package1/' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedPackageLock1, packageLockContent1); @@ -2429,23 +2301,23 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var packageLockContent2 = await reader2.ReadToEndAsync(); var expectedPackageLock2 = """ - Version: 5 - Closures: { - Root: { - Wren: { - Package1: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + Package1: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - "mwasplund|Soup.Wren": { Version: "4.5.6" } - } + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedPackageLock2, packageLockContent2); } @@ -2465,38 +2337,47 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency_WithToolDependenc new Path("C:/Root/MyPackage/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - Dependencies: { - Build: [ - { Reference: "../Package1/" } - ] - } - """)))); + Name: 'MyPackage' + Language: 'Wren|3.2.1' + Version: '1.0.0' + Dependencies: { + Build: [ + { Reference: '../Package1/' } + ] + } + """)))); mockFileSystem.CreateMockFile( new Path("C:/Root/Package1/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package1" - Language: "Wren|4.5.6" - Version: "1.2.3" - Dependencies: { - Tool: [ - { Reference: "../Package2/" } - ] - } - """)))); + Name: 'Package1' + Language: 'Wren|4.5.6' + Version: '1.2.3' + Dependencies: { + Tool: [ + { Reference: '../Package2/' } + ] + } + """)))); mockFileSystem.CreateMockFile( new Path("C:/Root/Package2/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package2" - Language: "C++|3.2.1" - Version: "2.3.4" - """)))); + Name: 'Package2' + Language: 'C++|5.0.0' + Version: '2.3.4' + """)))); + + mockFileSystem.CreateMockFile( + new Path("C:/PackageStore/Wren/mwasplund/Soup.Cpp/5.0.0/Recipe.sml"), + new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( + """ + Name: 'Soup.Cpp' + Language: 'Wren|4' + Version: '5.0.0' + """)))); // Mock out the http var mockMessageHandler = new Mock(); @@ -2604,15 +2485,27 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency_WithToolDependenc HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":3,"language":{"name":"Wren","version":{"major":3,"minor":2,"patch":1}},"dependencies":{"Build":[2]}},"localPackages":[{"id":1,"language":{"name":"C\u002B\u002B","version":{"major":5,"minor":0,"patch":0}},"dependencies":{}},{"id":2,"language":{"name":"Wren","version":{"major":4,"minor":5,"patch":6}},"dependencies":{"Tool":[1]}}],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult1)), - }) + }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":2,"language":{"name":"Wren","version":{"major":4,"minor":5,"patch":6}},"dependencies":{"Tool":[1]}},"localPackages":[{"id":1,"language":{"name":"C\u002B\u002B","version":{"major":5,"minor":0,"patch":0}},"dependencies":{}}],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult2)), - }) + }); + _ = mockMessageHandler + .SetupSequence(messageHandler => messageHandler.SendAsync( + HttpMethod.Get, + new Uri("https://test.api.soupbuild.com/v1/closure/generate"), + It.IsAny(), + """{"rootPackage":{"id":1,"language":{"name":"C\u002B\u002B","version":{"major":5,"minor":0,"patch":0}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult3)), @@ -2621,8 +2514,6 @@ public async Task RestorePackagesAsync_HasLocalBuildDependency_WithToolDependenc var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -2643,11 +2534,11 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "DIAG: Load Recipe: C:/Root/Package1/Recipe.sml", "DIAG: Load Recipe: C:/Root/Package2/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:C++ MyPackage -> ./", + "DIAG: Root:Wren MyPackage -> ./", "DIAG: Build0:Wren Package1 -> ../Package1/", "DIAG: Tool0:C++ Package2 -> ../Package2/", "INFO: Restore Packages for Closure Root", - "INFO: Restore Packages for Language C++", + "INFO: Restore Packages for Language Wren", "INFO: Skip Package: MyPackage -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", @@ -2716,7 +2607,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Id = 3, Language = new Api.Client.LanguageReferenceModel() { - Name = "C++", + Name = "Wren", Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, }, Dependencies = new Dictionary>() @@ -2738,7 +2629,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Language = new Api.Client.LanguageReferenceModel() { Name = "C++", - Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionModel() { Major = 5, Minor = 0, Patch = 0, }, }, Dependencies = new Dictionary>(), }, @@ -2765,20 +2656,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -2826,7 +2703,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Language = new Api.Client.LanguageReferenceModel() { Name = "C++", - Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionModel() { Major = 5, Minor = 0, Patch = 0, }, }, Dependencies = new Dictionary>(), }, @@ -2834,20 +2711,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -2874,7 +2737,7 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( Language = new Api.Client.LanguageReferenceModel() { Name = "C++", - Version = new Api.Client.SemanticVersionModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionModel() { Major = 5, Minor = 0, Patch = 0, }, }, Dependencies = new Dictionary>(), }, @@ -2882,20 +2745,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -2923,25 +2772,25 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var myPackageLockContent = await myPackageLockReader.ReadToEndAsync(); var expectedMyPackageLock = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - Wren: { - Package1: { Version: "../Package1/" } - } + } + Build0: { + Wren: { + Package1: { Version: '../Package1/' } } - Tool0: { - "C++": { - Package2: { Version: "../Package2/" } - } + } + Tool0: { + 'C++': { + Package2: { Version: '../Package2/' } } } - """; + } + """; Assert.Equal(expectedMyPackageLock, myPackageLockContent); @@ -2951,21 +2800,21 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var packageLock1Content = await package1LockReader.ReadToEndAsync(); var expectedPackage1Lock = """ - Version: 5 - Closures: { - Root: { - Wren: { - Package1: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + Package1: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { + } + Build0: { - } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedPackage1Lock, packageLock1Content); @@ -2975,21 +2824,21 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( var packageLock2Content = await package2LockReader.ReadToEndAsync(); var expectedPackage2Lock = """ - Version: 5 - Closures: { - Root: { - "C++": { - Package2: { Version: "./", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + 'C++': { + Package2: { Version: './', Build: 'Build0', Tool: 'Tool0' } } - Build0: { + } + Build0: { - } - Tool0: { + } + Tool0: { - } } - """; + } + """; Assert.Equal(expectedPackage2Lock, packageLock2Content); } @@ -3008,24 +2857,24 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_OneOverrid // Create the original file var original = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "Build0", Tool: "Tool0" } - "User1|Package1": { Version: "1.2.4", Build: "Build0", Tool: "Tool0" } - "User1|Package2": { Version: "3.2.1", Build: "Build0", Tool: "Tool0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + MyPackage: { Version: './', Build: 'Build0', Tool: 'Tool0' } + 'User1|Package1': { Version: '1.2.4', Build: 'Build0', Tool: 'Tool0' } + 'User1|Package2': { Version: '3.2.1', Build: 'Build0', Tool: 'Tool0' } } - Build0: { - "Wren": { - "mwasplund|Soup.Cpp": { Version: "3.2.2" } - } - } - Tool0: { + } + Build0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.5' } } } - """; + Tool0: { + } + } + """; using var originalContent = new System.IO.MemoryStream(); await originalContent.WriteAsync(Encoding.UTF8.GetBytes(original)); _ = originalContent.Seek(0, System.IO.SeekOrigin.Begin); @@ -3034,13 +2883,13 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_OneOverrid new MockFile(originalContent)); mockFileSystem.CreateMockFile( - new Path("C:/PackageStore/Wren/mwasplund/Soup.Cpp/3.2.2/Recipe.sml"), + new Path("C:/PackageStore/Wren/mwasplund/Soup.Wren/4.5.5/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Soup.Cpp" - Language: "Wren|1.2.3" - Version: "3.2.2" - """)))); + Name: 'Soup.Wren' + Language: 'Wren|1.2.3' + Version: '4.5.5' + """)))); // Setup the mock zip manager var mockZipManager = new Mock(); @@ -3054,21 +2903,21 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_OneOverrid _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package1/versions/1.2.4/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package1/versions/1.2.4/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package2/versions/3.2.1/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package2/versions/3.2.1/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); _ = mockMessageHandler .Setup(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/Wren/mwasplund/Soup.Cpp/versions/3.2.2/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/mwasplund/Soup.Wren/versions/4.5.5/download"), It.IsAny(), null)) .Returns(() => new HttpResponseMessage()); @@ -3095,10 +2944,10 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_OneOverrid { Public = new Api.Client.PackagePublicExactReferenceModel() { - Name = "Soup.Cpp", + Name = "Soup.Wren", Owner = "mwasplund", Language = "Wren", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, + Version = new Api.Client.SemanticVersionExactModel() { Major = 4, Minor = 5, Patch = 6, }, } }, } @@ -3117,7 +2966,7 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_OneOverrid HttpMethod.Get, new Uri("https://test.api.soupbuild.com/v1/closure/generate"), It.IsAny(), - It.IsAny())) + """{"rootPackage":{"id":1,"language":{"name":"Wren","version":{"major":1,"minor":2,"patch":3}},"dependencies":{}},"localPackages":[],"publicPackages":[],"preferredVersions":[{"language":"Wren","owner":"mwasplund","name":"Soup.Wren","version":{"major":4,"minor":5,"patch":6}}]}""")) .Returns(() => new HttpResponseMessage() { Content = new StringContent(JsonSerializer.Serialize(generateClosureResult)), @@ -3126,8 +2975,6 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_OneOverrid var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -3144,35 +2991,35 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "DIAG: Load Package Lock: C:/Root/MyPackage/PackageLock.sml", "INFO: Restore from package lock", "INFO: Restore Packages for Closure Root", - "INFO: Restore Packages for Language C++", + "INFO: Restore Packages for Language Wren", "INFO: Skip Package: MyPackage -> ./", - "HIGH: Install Package: C++ User1 Package1@1.2.4", + "HIGH: Install Package: Wren User1 Package1@1.2.4", "HIGH: Downloading package", - "HIGH: Install Package: C++ User1 Package2@3.2.1", + "HIGH: Install Package: Wren User1 Package2@3.2.1", "HIGH: Downloading package", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", - "HIGH: Install Package: Wren mwasplund Soup.Cpp@3.2.2", + "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.5", "HIGH: Downloading package", "INFO: Restore Packages for Closure Tool0", - "DIAG: Create Directory: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/", - "INFO: Ensure Package Lock Exists: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/PackageLock.sml", - "DIAG: Load Package Lock: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/PackageLock.sml", + "DIAG: Create Directory: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/", + "INFO: Ensure Package Lock Exists: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/PackageLock.sml", + "DIAG: Load Package Lock: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/PackageLock.sml", "INFO: Package Lock file does not exist.", "INFO: Discovering full closure", - "DIAG: Load Recipe: C:/PackageStore/Wren/mwasplund/Soup.Cpp/3.2.2/Recipe.sml", + "DIAG: Load Recipe: C:/PackageStore/Wren/mwasplund/Soup.Wren/4.5.5/Recipe.sml", "INFO: Generate final service closure", - "DIAG: Root:Wren Soup.Cpp -> ./", - "DIAG: Build0:Wren mwasplund|Soup.Cpp -> 3.2.1", + "DIAG: Root:Wren mwasplund|Soup.Wren -> ./", + "DIAG: Build0:Wren mwasplund|Soup.Wren -> 4.5.6", "INFO: Restore Packages for Closure Root", "INFO: Restore Packages for Language Wren", - "INFO: Skip Package: Soup.Cpp -> ./", + "INFO: Skip Package: mwasplund|Soup.Wren -> ./", "INFO: Restore Packages for Closure Build0", "INFO: Restore Packages for Language Wren", - "HIGH: Install Package: Wren mwasplund Soup.Cpp@3.2.1", + "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", "HIGH: Skip built in language version in build closure", "INFO: Restore Packages for Closure Tool0", - "HIGH: Skip built in language version in build closure" + "HIGH: Skip built in language version in build closure", }, testListener.Messages); @@ -3182,47 +3029,47 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( { "Exists: C:/Root/MyPackage/PackageLock.sml", "OpenRead: C:/Root/MyPackage/PackageLock.sml", - "Exists: C:/PackageStore/Cpp/User1/Package1/1.2.4/", + "Exists: C:/PackageStore/Wren/User1/Package1/1.2.4/", "OpenWriteTruncate: C:/Staging/Package1.zip", - "CreateDirectory: C:/Staging/C++_Package1_1.2.4/", + "CreateDirectory: C:/Staging/Wren_Package1_1.2.4/", "DeleteFile: C:/Staging/Package1.zip", - "Exists: C:/PackageStore/Cpp/User1/Package1", - "CreateDirectory: C:/PackageStore/Cpp/User1/Package1", - "Rename: [C:/Staging/C++_Package1_1.2.4/] -> [C:/PackageStore/Cpp/User1/Package1/1.2.4/]", - "Exists: C:/PackageStore/Cpp/User1/Package2/3.2.1/", + "Exists: C:/PackageStore/Wren/User1/Package1", + "CreateDirectory: C:/PackageStore/Wren/User1/Package1", + "Rename: [C:/Staging/Wren_Package1_1.2.4/] -> [C:/PackageStore/Wren/User1/Package1/1.2.4/]", + "Exists: C:/PackageStore/Wren/User1/Package2/3.2.1/", "OpenWriteTruncate: C:/Staging/Package2.zip", - "CreateDirectory: C:/Staging/C++_Package2_3.2.1/", + "CreateDirectory: C:/Staging/Wren_Package2_3.2.1/", "DeleteFile: C:/Staging/Package2.zip", - "Exists: C:/PackageStore/Cpp/User1/Package2", - "CreateDirectory: C:/PackageStore/Cpp/User1/Package2", - "Rename: [C:/Staging/C++_Package2_3.2.1/] -> [C:/PackageStore/Cpp/User1/Package2/3.2.1/]", - "Exists: C:/PackageStore/Wren/mwasplund/Soup.Cpp/3.2.2/", - "OpenWriteTruncate: C:/Staging/Soup.Cpp.zip", - "CreateDirectory: C:/Staging/Wren_Soup.Cpp_3.2.2/", - "DeleteFile: C:/Staging/Soup.Cpp.zip", - "Exists: C:/PackageStore/Wren/mwasplund/Soup.Cpp", - "CreateDirectory: C:/PackageStore/Wren/mwasplund/Soup.Cpp", - "Rename: [C:/Staging/Wren_Soup.Cpp_3.2.2/] -> [C:/PackageStore/Wren/mwasplund/Soup.Cpp/3.2.2/]", - "Exists: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/", - "CreateDirectory: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/", - "Exists: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/PackageLock.sml", - "Exists: C:/PackageStore/Wren/mwasplund/Soup.Cpp/3.2.2/Recipe.sml", - "OpenRead: C:/PackageStore/Wren/mwasplund/Soup.Cpp/3.2.2/Recipe.sml", - "OpenWriteTruncate: C:/LockStore/Wren/mwasplund/Soup.Cpp/3.2.2/PackageLock.sml", + "Exists: C:/PackageStore/Wren/User1/Package2", + "CreateDirectory: C:/PackageStore/Wren/User1/Package2", + "Rename: [C:/Staging/Wren_Package2_3.2.1/] -> [C:/PackageStore/Wren/User1/Package2/3.2.1/]", + "Exists: C:/PackageStore/Wren/mwasplund/Soup.Wren/4.5.5/", + "OpenWriteTruncate: C:/Staging/Soup.Wren.zip", + "CreateDirectory: C:/Staging/Wren_Soup.Wren_4.5.5/", + "DeleteFile: C:/Staging/Soup.Wren.zip", + "Exists: C:/PackageStore/Wren/mwasplund/Soup.Wren", + "CreateDirectory: C:/PackageStore/Wren/mwasplund/Soup.Wren", + "Rename: [C:/Staging/Wren_Soup.Wren_4.5.5/] -> [C:/PackageStore/Wren/mwasplund/Soup.Wren/4.5.5/]", + "Exists: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/", + "CreateDirectory: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/", + "Exists: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/PackageLock.sml", + "Exists: C:/PackageStore/Wren/mwasplund/Soup.Wren/4.5.5/Recipe.sml", + "OpenRead: C:/PackageStore/Wren/mwasplund/Soup.Wren/4.5.5/Recipe.sml", + "OpenWriteTruncate: C:/LockStore/Wren/mwasplund/Soup.Wren/4.5.5/PackageLock.sml", }, mockFileSystem.Requests); // Verify zip requests mockZipManager.Verify(zip => zip.ExtractToDirectory( new Path("C:/Staging/Package1.zip"), - new Path("C:/Staging/C++_Package1_1.2.4/")), + new Path("C:/Staging/Wren_Package1_1.2.4/")), Times.Once()); mockZipManager.Verify(zip => zip.ExtractToDirectory( new Path("C:/Staging/Package2.zip"), - new Path("C:/Staging/C++_Package2_3.2.1/")), + new Path("C:/Staging/Wren_Package2_3.2.1/")), Times.Once()); mockZipManager.Verify(zip => zip.ExtractToDirectory( - new Path("C:/Staging/Soup.Cpp.zip"), new Path("C:/Staging/Wren_Soup.Cpp_3.2.2/")), + new Path("C:/Staging/Soup.Wren.zip"), new Path("C:/Staging/Wren_Soup.Wren_4.5.5/")), Times.Once()); mockZipManager.VerifyNoOtherCalls(); @@ -3243,20 +3090,6 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( PublicPackages = new List(), PreferredVersions = new List() { - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.CSharp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 1, Minor = 2, Patch = 3, }, - }, - new Api.Client.PackagePublicExactReferenceModel() - { - Language = "Wren", - Owner = "mwasplund", - Name = "Soup.Cpp", - Version = new Api.Client.SemanticVersionExactModel() { Major = 3, Minor = 2, Patch = 1, }, - }, new Api.Client.PackagePublicExactReferenceModel() { Language = "Wren", @@ -3278,21 +3111,21 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( mockMessageHandler.Verify(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package1/versions/1.2.4/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package1/versions/1.2.4/download"), "{Accept: [application/json]}", null), Times.Once()); mockMessageHandler.Verify(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/C%2B%2B/User1/Package2/versions/3.2.1/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/User1/Package2/versions/3.2.1/download"), "{Accept: [application/json]}", null), Times.Once()); mockMessageHandler.Verify(messageHandler => messageHandler.SendAsync( HttpMethod.Get, - new Uri("https://test.api.soupbuild.com/v1/packages/Wren/mwasplund/Soup.Cpp/versions/3.2.2/download"), + new Uri("https://test.api.soupbuild.com/v1/packages/Wren/mwasplund/Soup.Wren/versions/4.5.5/download"), "{Accept: [application/json]}", null), Times.Once()); @@ -3312,31 +3145,31 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_AllLocal() using var scopedFileSystem = new ScopedSingleton(mockFileSystem); mockFileSystem.RegisterChildren( - new Path("C:/PackageStore/Cpp/User1/Package1/1.2.4/"), + new Path("C:/PackageStore/Wren/User1/Package1/1.2.4/"), new List()); mockFileSystem.RegisterChildren( - new Path("C:/PackageStore/Cpp/User1/Package2/3.2.1/"), + new Path("C:/PackageStore/Wren/User1/Package2/3.2.1/"), new List()); // Create the original file var original = """ - Version: 5 - Closures: { - Root: { - "C++": { - MyPackage: { Version: "./", Build: "BuildSet0" } - "User1|Package1": { Version: "1.2.4", Build: "BuildSet0" } - "User1|Package2": { Version: "3.2.1", Build: "BuildSet0" } - } + Version: 5 + Closures: { + Root: { + Wren: { + MyPackage: { Version: './', Build: 'BuildSet0' } + 'User1|Package1': { Version: '1.2.4', Build: 'BuildSet0' } + 'User1|Package2': { Version: '3.2.1', Build: 'BuildSet0' } } - BuildSet0: { - "C#": { - "mwasplund|Soup.Cpp": { Version: "3.2.1" } - } + } + BuildSet0: { + Wren: { + 'mwasplund|Soup.Wren': { Version: '4.5.6' } } } - """; + } + """; using var originalContent = new System.IO.MemoryStream(); await originalContent.WriteAsync(Encoding.UTF8.GetBytes(original)); _ = originalContent.Seek(0, System.IO.SeekOrigin.Begin); @@ -3352,8 +3185,6 @@ public async Task RestorePackagesAsync_HasDependencies_HasPackageLock_AllLocal() var uut = new ClosureManager( new Uri("https://test.api.soupbuild.com/"), httpClient, - new SemanticVersion(1, 2, 3), - new SemanticVersion(3, 2, 1), new SemanticVersion(4, 5, 6)); await uut.GenerateAndRestoreRecursiveLocksAsync( @@ -3370,17 +3201,17 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( "DIAG: Load Package Lock: C:/Root/MyPackage/PackageLock.sml", "INFO: Restore from package lock", "INFO: Restore Packages for Closure Root", - "INFO: Restore Packages for Language C++", + "INFO: Restore Packages for Language Wren", "INFO: Skip Package: MyPackage -> ./", - "HIGH: Install Package: C++ User1 Package1@1.2.4", + "HIGH: Install Package: Wren User1 Package1@1.2.4", "HIGH: Found local version", - "HIGH: Install Package: C++ User1 Package2@3.2.1", + "HIGH: Install Package: Wren User1 Package2@3.2.1", "HIGH: Found local version", "INFO: Restore Packages for Closure BuildSet0", - "INFO: Restore Packages for Language C#", - "HIGH: Install Package: C# mwasplund Soup.Cpp@3.2.1", + "INFO: Restore Packages for Language Wren", + "HIGH: Install Package: Wren mwasplund Soup.Wren@4.5.6", + "HIGH: Skip built in language version in build closure", "HIGH: Skip built in language version in build closure", - "HIGH: Skip built in language version in build closure" }, testListener.Messages); @@ -3390,8 +3221,8 @@ await uut.GenerateAndRestoreRecursiveLocksAsync( { "Exists: C:/Root/MyPackage/PackageLock.sml", "OpenRead: C:/Root/MyPackage/PackageLock.sml", - "Exists: C:/PackageStore/Cpp/User1/Package1/1.2.4/", - "Exists: C:/PackageStore/Cpp/User1/Package2/3.2.1/", + "Exists: C:/PackageStore/Wren/User1/Package1/1.2.4/", + "Exists: C:/PackageStore/Wren/User1/Package2/3.2.1/", }, mockFileSystem.Requests); diff --git a/Source/GenerateSharp/PackageManager.UnitTests/PackageManagerUnitTests.cs b/Source/GenerateSharp/PackageManager.UnitTests/PackageManagerUnitTests.cs index fc89e4ee5..2ff48f339 100644 --- a/Source/GenerateSharp/PackageManager.UnitTests/PackageManagerUnitTests.cs +++ b/Source/GenerateSharp/PackageManager.UnitTests/PackageManagerUnitTests.cs @@ -101,10 +101,10 @@ public async Task InstallPackageReferenceAsync_WithVersion() using var originalContent = new System.IO.MemoryStream(); await originalContent.WriteAsync(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - """)); + Name: 'MyPackage' + Language: 'C++|3.2.1' + Version: '1.0.0' + """)); _ = originalContent.Seek(0, System.IO.SeekOrigin.Begin); mockFileSystem.CreateMockFile( new Path("C:/Root/MyPackage/Recipe.sml"), @@ -114,10 +114,10 @@ await originalContent.WriteAsync(Encoding.UTF8.GetBytes( new Path("C:/Users/Me/.soup/packages/Cpp/OtherPackage/1.2.3/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package1" - Language: "C++|3.2.1" - Version: "1.2.3" - """)))); + Name: 'Package1' + Language: 'C++|3.2.1' + Version: '1.2.3' + """)))); // Mock out the http var mockMessageHandler = new Mock(); @@ -188,15 +188,15 @@ await originalContent.WriteAsync(Encoding.UTF8.GetBytes( var recipeContent = await recipeReader.ReadToEndAsync(); var expectedRecipe = """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - Dependencies: { - Runtime: [ - "User1|OtherPackage@1.2.3" - ] - } - """; + Name: 'MyPackage' + Language: 'C++|3.2.1' + Version: '1.0.0' + Dependencies: { + Runtime: [ + 'User1|OtherPackage@1.2.3' + ] + } + """; Assert.Equal(expectedRecipe, recipeContent); } @@ -215,10 +215,10 @@ public async Task InstallPackageReferenceAsync_NoVersion() using var originalContent = new System.IO.MemoryStream(); await originalContent.WriteAsync(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - """)); + Name: 'MyPackage' + Language: 'C++|3.2.1' + Version: '1.0.0' + """)); _ = originalContent.Seek(0, System.IO.SeekOrigin.Begin); mockFileSystem.CreateMockFile( new Path("C:/Root/MyPackage/Recipe.sml"), @@ -228,10 +228,10 @@ await originalContent.WriteAsync(Encoding.UTF8.GetBytes( new Path("C:/Users/Me/.soup/packages/Cpp/OtherPackage/1.2.3/Recipe.sml"), new MockFile(new System.IO.MemoryStream(Encoding.UTF8.GetBytes( """ - Name: "Package1" - Language: "C++|3.2.1" - Version: "1.2.3" - """)))); + Name: 'Package1' + Language: 'C++|3.2.1' + Version: '1.2.3' + """)))); // Mock out the http var mockMessageHandler = new Mock(); @@ -332,15 +332,15 @@ await originalContent.WriteAsync(Encoding.UTF8.GetBytes( var recipeContent = await recipeReader.ReadToEndAsync(); var expectedRecipe = """ - Name: "MyPackage" - Language: "C++|3.2.1" - Version: "1.0.0" - Dependencies: { - Runtime: [ - "User1|OtherPackage@1.2.3" - ] - } - """; + Name: 'MyPackage' + Language: 'C++|3.2.1' + Version: '1.0.0' + Dependencies: { + Runtime: [ + 'User1|OtherPackage@1.2.3' + ] + } + """; Assert.Equal(expectedRecipe, recipeContent); } @@ -359,10 +359,10 @@ public async Task PublishPackageAsync() using var originalContent = new System.IO.MemoryStream(); await originalContent.WriteAsync(Encoding.UTF8.GetBytes( """ - Name: "MyPackage" - Language: "C++|0.1" - Version: "1.0.0" - """)); + Name: 'MyPackage' + Language: 'C++|0.1' + Version: '1.0.0' + """)); _ = originalContent.Seek(0, System.IO.SeekOrigin.Begin); mockFileSystem.CreateMockFile( new Path("C:/Root/MyPackage/Recipe.sml"), diff --git a/Source/GenerateSharp/PackageManager/Program.cs b/Source/GenerateSharp/PackageManager/Program.cs index 1e3a42a35..ca6153c5a 100644 --- a/Source/GenerateSharp/PackageManager/Program.cs +++ b/Source/GenerateSharp/PackageManager/Program.cs @@ -40,14 +40,11 @@ public static async Task Main(string[] args) var workingDirectory = new Path(args[1]); using var httpClient = new HttpClient(); - SemanticVersion builtInLanguageVersionCSharp = new SemanticVersion(0, 9, 0); - SemanticVersion builtInLanguageVersionCpp = new SemanticVersion(0, 8, 2); - SemanticVersion builtInLanguageVersionWren = new SemanticVersion(0, 3, 0); + SemanticVersion minimumLanguageVersionCpp = new SemanticVersion(0, 12, 0); + SemanticVersion builtInLanguageVersionWren = new SemanticVersion(0, 4, 1); var closureManager = new ClosureManager( SoupApiEndpoint, httpClient, - builtInLanguageVersionCSharp, - builtInLanguageVersionCpp, builtInLanguageVersionWren); var packageManager = new PackageManager( SoupApiEndpoint, @@ -58,7 +55,7 @@ public static async Task Main(string[] args) { case "initialize-package": { - var initializeCommand = new InitializeCommand(builtInLanguageVersionCpp); + var initializeCommand = new InitializeCommand(minimumLanguageVersionCpp); await initializeCommand.InitializePackageAsync(workingDirectory); } diff --git a/Source/GenerateSharp/Swhere.Core.UnitTests/Utilities/SwhereManagerUnitTests.cs b/Source/GenerateSharp/Swhere.Core.UnitTests/Utilities/SwhereManagerUnitTests.cs index ecc09efe7..98617b10c 100644 --- a/Source/GenerateSharp/Swhere.Core.UnitTests/Utilities/SwhereManagerUnitTests.cs +++ b/Source/GenerateSharp/Swhere.Core.UnitTests/Utilities/SwhereManagerUnitTests.cs @@ -186,93 +186,93 @@ public async Task Discover() var expected = @"SDKs: [ { - Name: ""DotNet"" + Name: 'DotNet' SourceDirectories: [ - ""C:/Program Files/dotnet"" + 'C:/Program Files/dotnet' ] Properties: { - DotNetExecutable: ""C:/Program Files/dotnet/dotnet.exe"" + DotNetExecutable: 'C:/Program Files/dotnet/dotnet.exe' SDKs: { - ""5.0.0"": ""C:/Program Files/dotnet/sdk"" - ""6.0.8"": ""C:/Program Files/dotnet/sdk"" - ""7.0.201"": ""C:/Program Files/dotnet/sdk"" - ""7.0.300-preview.23179.2"": ""C:/Program Files/dotnet/sdk"" - ""7.0.304"": ""C:/Program Files/dotnet/sdk"" - ""7.0.400-preview.23274.1"": ""C:/Program Files/dotnet/sdk"" + '5.0.0': 'C:/Program Files/dotnet/sdk' + '6.0.8': 'C:/Program Files/dotnet/sdk' + '7.0.201': 'C:/Program Files/dotnet/sdk' + '7.0.300-preview.23179.2': 'C:/Program Files/dotnet/sdk' + '7.0.304': 'C:/Program Files/dotnet/sdk' + '7.0.400-preview.23274.1': 'C:/Program Files/dotnet/sdk' } Runtimes: { - ""Microsoft.AspNetCore.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" + 'Microsoft.AspNetCore.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' } - ""Microsoft.NETCore.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.12"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.15"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.20"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" + 'Microsoft.NETCore.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.12': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.15': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.20': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' } - ""Microsoft.WindowsDesktop.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" + 'Microsoft.WindowsDesktop.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' } } TargetingPacks: { - ""Microsoft.NETCore.App.Ref"": { - ""5.0.0"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.7"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.8"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.9"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""7.0.7"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" + 'Microsoft.NETCore.App.Ref': { + '5.0.0': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.7': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.8': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.9': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '7.0.7': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' } } } } { - Name: ""MSVC"" + Name: 'MSVC' SourceDirectories: [ - ""C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/"" + 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/' ] Properties: { - Version: ""14.33.31629"" - VCToolsRoot: ""C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/"" + Version: '14.33.31629' + VCToolsRoot: 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/' } } { - Name: ""Windows"" + Name: 'Windows' SourceDirectories: [ - ""C:/Program Files (x86)/Windows Kits/10/"" + 'C:/Program Files (x86)/Windows Kits/10/' ] Properties: { - Version: ""10.0.19041.0"" - RootPath: ""C:/Program Files (x86)/Windows Kits/10/"" + Version: '10.0.19041.0' + RootPath: 'C:/Program Files (x86)/Windows Kits/10/' } } { - Name: ""NetFXTools"" + Name: 'NetFXTools' SourceDirectories: [ - ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' ] Properties: { - ToolsRoot: ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + ToolsRoot: 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' } } ]"; @@ -453,93 +453,93 @@ public async Task Discover_Prerelease() var expected = @"SDKs: [ { - Name: ""DotNet"" + Name: 'DotNet' SourceDirectories: [ - ""C:/Program Files/dotnet"" + 'C:/Program Files/dotnet' ] Properties: { - DotNetExecutable: ""C:/Program Files/dotnet/dotnet.exe"" + DotNetExecutable: 'C:/Program Files/dotnet/dotnet.exe' SDKs: { - ""5.0.0"": ""C:/Program Files/dotnet/sdk"" - ""6.0.8"": ""C:/Program Files/dotnet/sdk"" - ""7.0.201"": ""C:/Program Files/dotnet/sdk"" - ""7.0.300-preview.23179.2"": ""C:/Program Files/dotnet/sdk"" - ""7.0.304"": ""C:/Program Files/dotnet/sdk"" - ""7.0.400-preview.23274.1"": ""C:/Program Files/dotnet/sdk"" + '5.0.0': 'C:/Program Files/dotnet/sdk' + '6.0.8': 'C:/Program Files/dotnet/sdk' + '7.0.201': 'C:/Program Files/dotnet/sdk' + '7.0.300-preview.23179.2': 'C:/Program Files/dotnet/sdk' + '7.0.304': 'C:/Program Files/dotnet/sdk' + '7.0.400-preview.23274.1': 'C:/Program Files/dotnet/sdk' } Runtimes: { - ""Microsoft.AspNetCore.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" + 'Microsoft.AspNetCore.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' } - ""Microsoft.NETCore.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.12"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.15"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.20"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" + 'Microsoft.NETCore.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.12': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.15': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.20': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' } - ""Microsoft.WindowsDesktop.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" + 'Microsoft.WindowsDesktop.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' } } TargetingPacks: { - ""Microsoft.NETCore.App.Ref"": { - ""5.0.0"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.7"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.8"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.9"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""7.0.7"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" + 'Microsoft.NETCore.App.Ref': { + '5.0.0': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.7': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.8': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.9': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '7.0.7': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' } } } } { - Name: ""MSVC"" + Name: 'MSVC' SourceDirectories: [ - ""C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/"" + 'C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/' ] Properties: { - Version: ""14.34.31823"" - VCToolsRoot: ""C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/"" + Version: '14.34.31823' + VCToolsRoot: 'C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/' } } { - Name: ""Windows"" + Name: 'Windows' SourceDirectories: [ - ""C:/Program Files (x86)/Windows Kits/10/"" + 'C:/Program Files (x86)/Windows Kits/10/' ] Properties: { - Version: ""10.0.19041.0"" - RootPath: ""C:/Program Files (x86)/Windows Kits/10/"" + Version: '10.0.19041.0' + RootPath: 'C:/Program Files (x86)/Windows Kits/10/' } } { - Name: ""NetFXTools"" + Name: 'NetFXTools' SourceDirectories: [ - ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' ] Properties: { - ToolsRoot: ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + ToolsRoot: 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' } } ]"; @@ -564,51 +564,51 @@ public async Task Discover_UpdateExisting() var original = @"SDKs: [ { - Name: ""CustomSDK"" + Name: 'CustomSDK' SourceDirectories: [ - ""C:/SomeWhere/"" + 'C:/SomeWhere/' ] Properties: { - ToolsRoot: ""C:/SomeWhere/"" + ToolsRoot: 'C:/SomeWhere/' } } { - Name: ""DotNet"" + Name: 'DotNet' SourceDirectories: [ - ""C:/Program Files/dotnet/"" + 'C:/Program Files/dotnet/' ] Properties: { - RuntimeVersion: ""6.0.9"" - RootPath: ""C:/Program Files/dotnet/"" + RuntimeVersion: '6.0.9' + RootPath: 'C:/Program Files/dotnet/' } } { - Name: ""MSVC"" + Name: 'MSVC' SourceDirectories: [ - ""C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/"" + 'C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/' ] Properties: { - Version: ""14.34.31823"" - VCToolsRoot: ""C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/"" + Version: '14.34.31823' + VCToolsRoot: 'C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31823/' } } { - Name: ""Windows"" + Name: 'Windows' SourceDirectories: [ - ""C:/Program Files (x86)/Windows Kits/10/"" + 'C:/Program Files (x86)/Windows Kits/10/' ] Properties: { - Version: ""10.0.19041.0"" - RootPath: ""C:/Program Files (x86)/Windows Kits/10/"" + Version: '10.0.19041.0' + RootPath: 'C:/Program Files (x86)/Windows Kits/10/' } } { - Name: ""NetFXTools"" + Name: 'NetFXTools' SourceDirectories: [ - ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' ] Properties: { - ToolsRoot: ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + ToolsRoot: 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' } } ] @@ -778,102 +778,102 @@ public async Task Discover_UpdateExisting() var expected = @"SDKs: [ { - Name: ""CustomSDK"" + Name: 'CustomSDK' SourceDirectories: [ - ""C:/SomeWhere/"" + 'C:/SomeWhere/' ] Properties: { - ToolsRoot: ""C:/SomeWhere/"" + ToolsRoot: 'C:/SomeWhere/' } } { - Name: ""DotNet"" + Name: 'DotNet' SourceDirectories: [ - ""C:/Program Files/dotnet"" + 'C:/Program Files/dotnet' ] Properties: { - DotNetExecutable: ""C:/Program Files/dotnet/dotnet.exe"" + DotNetExecutable: 'C:/Program Files/dotnet/dotnet.exe' SDKs: { - ""5.0.0"": ""C:/Program Files/dotnet/sdk"" - ""6.0.8"": ""C:/Program Files/dotnet/sdk"" - ""7.0.201"": ""C:/Program Files/dotnet/sdk"" - ""7.0.300-preview.23179.2"": ""C:/Program Files/dotnet/sdk"" - ""7.0.304"": ""C:/Program Files/dotnet/sdk"" - ""7.0.400-preview.23274.1"": ""C:/Program Files/dotnet/sdk"" + '5.0.0': 'C:/Program Files/dotnet/sdk' + '6.0.8': 'C:/Program Files/dotnet/sdk' + '7.0.201': 'C:/Program Files/dotnet/sdk' + '7.0.300-preview.23179.2': 'C:/Program Files/dotnet/sdk' + '7.0.304': 'C:/Program Files/dotnet/sdk' + '7.0.400-preview.23274.1': 'C:/Program Files/dotnet/sdk' } Runtimes: { - ""Microsoft.AspNetCore.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App"" + 'Microsoft.AspNetCore.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.AspNetCore.App' } - ""Microsoft.NETCore.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.12"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.15"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""6.0.20"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.NETCore.App"" + 'Microsoft.NETCore.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.12': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.15': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '6.0.20': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.NETCore.App' } - ""Microsoft.WindowsDesktop.App"": { - ""3.1.32"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""5.0.17"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.14"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.16"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""6.0.18"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.3"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.5"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" - ""7.0.7"": ""C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App"" + 'Microsoft.WindowsDesktop.App': { + '3.1.32': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '5.0.17': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.14': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.16': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '6.0.18': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.3': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.5': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' + '7.0.7': 'C:/Program Files/dotnet/shared/Microsoft.WindowsDesktop.App' } } TargetingPacks: { - ""Microsoft.NETCore.App.Ref"": { - ""5.0.0"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.7"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.8"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""6.0.9"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" - ""7.0.7"": ""C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref"" + 'Microsoft.NETCore.App.Ref': { + '5.0.0': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.7': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.8': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '6.0.9': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' + '7.0.7': 'C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref' } } } } { - Name: ""MSVC"" + Name: 'MSVC' SourceDirectories: [ - ""C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/"" + 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/' ] Properties: { - Version: ""14.33.31629"" - VCToolsRoot: ""C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/"" + Version: '14.33.31629' + VCToolsRoot: 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/' } } { - Name: ""Windows"" + Name: 'Windows' SourceDirectories: [ - ""C:/Program Files (x86)/Windows Kits/10/"" + 'C:/Program Files (x86)/Windows Kits/10/' ] Properties: { - Version: ""10.0.19041.0"" - RootPath: ""C:/Program Files (x86)/Windows Kits/10/"" + Version: '10.0.19041.0' + RootPath: 'C:/Program Files (x86)/Windows Kits/10/' } } { - Name: ""NetFXTools"" + Name: 'NetFXTools' SourceDirectories: [ - ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' ] Properties: { - ToolsRoot: ""C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/"" + ToolsRoot: 'C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/' } } ] diff --git a/Source/GenerateSharp/Utilities.UnitTests/SML/SMLExtensionsUnitTests.cs b/Source/GenerateSharp/Utilities.UnitTests/SML/SMLExtensionsUnitTests.cs index 3f628cf72..f5a3d6623 100644 --- a/Source/GenerateSharp/Utilities.UnitTests/SML/SMLExtensionsUnitTests.cs +++ b/Source/GenerateSharp/Utilities.UnitTests/SML/SMLExtensionsUnitTests.cs @@ -19,7 +19,7 @@ public async Task AddStringItemWithSyntax() var content = await SerializeAsync(uut); var expected = -@"NewItem: ""Value1"""; +@"NewItem: 'Value1'"; Assert.Equal(expected, content); } @@ -33,8 +33,8 @@ public async Task AddTwoStringItemWithSyntax() var content = await SerializeAsync(uut); var expected = -@"NewItem1: ""Value1"" -NewItem2: ""Value2"""; +@"NewItem1: 'Value1' +NewItem2: 'Value2'"; Assert.Equal(expected, content); } @@ -62,7 +62,7 @@ public async Task AddArrayWithSyntax_UnsafeKey() var content = await SerializeAsync(uut); var expected = -@"""#"": [ +@"'#': [ ]"; Assert.Equal(expected, content); @@ -98,7 +98,7 @@ public async Task AddArrayAndItemWithSyntax() var content = await SerializeAsync(uut); var expected = @"NewList: [ - ""NewItem"" + 'NewItem' ]"; Assert.Equal(expected, content); } @@ -134,7 +134,7 @@ public async Task AddArrayAndTableAndItemWithSyntax() var expected = @"NewList: [ { - NewItem: ""NewValue"" + NewItem: 'NewValue' } ]"; Assert.Equal(expected, content); @@ -154,8 +154,8 @@ public async Task AddArrayAndTableAndTwoItemsWithSyntax() var expected = @"NewList: [ { - NewItem1: ""NewValue1"" - NewItem2: ""NewValue2"" + NewItem1: 'NewValue1' + NewItem2: 'NewValue2' } ]"; Assert.Equal(expected, content); @@ -185,7 +185,7 @@ public async Task AddTableWithSyntax_UnsafeKey() var content = await SerializeAsync(uut); var expected = -@"""#"": { +@"'#': { }"; Assert.Equal(expected, content); @@ -215,7 +215,7 @@ public async Task AddInlineTableWithItemsSyntax() var content = await SerializeAsync(uut); var expected = -@"NewTable: { Item1: ""Value1"", Item2: ""Value2"" }"; +@"NewTable: { Item1: 'Value1', Item2: 'Value2' }"; Assert.Equal(expected, content); } @@ -271,7 +271,7 @@ public async Task AddTableAndArrayAndTableWithSyntax() @"NewTable: { NewList: [ { - NewItem: ""NewValue"" + NewItem: 'NewValue' } ] }"; diff --git a/Source/GenerateSharp/Utilities.UnitTests/SML/SMLManagerUnitTests.cs b/Source/GenerateSharp/Utilities.UnitTests/SML/SMLManagerUnitTests.cs index 34b145157..0c9708c6d 100644 --- a/Source/GenerateSharp/Utilities.UnitTests/SML/SMLManagerUnitTests.cs +++ b/Source/GenerateSharp/Utilities.UnitTests/SML/SMLManagerUnitTests.cs @@ -26,8 +26,8 @@ public void Deserialize_GarbageThrows() public void Deserialize_Simple_Flat() { var recipe = - @"Name: ""MyPackage"" - Language: ""C++|1"""; + @"Name: 'MyPackage' + Language: 'C++|1'"; var actual = SMLManager.Deserialize(recipe); var expected = new SMLDocument( @@ -58,7 +58,7 @@ public void Deserialize_Simple_Flat() public void Deserialize_ComplexKey() { var recipe = - @"""#1%^`"": ""ComplexValue"""; + @"'#1%^`': 'ComplexValue'"; var actual = SMLManager.Deserialize(recipe); var expected = new SMLDocument( @@ -67,7 +67,7 @@ public void Deserialize_ComplexKey() { "#1%^`", new SMLTableValue( - new SMLToken("\"#1%^`\""), + new SMLToken("'#1%^`'"), "#1%^`", new SMLToken(":"), new SMLValue(new SMLStringValue("ComplexValue"))) @@ -81,7 +81,7 @@ public void Deserialize_ComplexKey() public void Deserialize_Simple_Inline() { var recipe = - @"Name: ""MyPackage"", Language: ""C++|1"""; + @"Name: 'MyPackage', Language: 'C++|1'"; var actual = SMLManager.Deserialize(recipe); var expected = new SMLDocument( @@ -112,11 +112,11 @@ public void Deserialize_Simple_Inline() public void Deserialize_AllProperties() { var recipe = - @"Name: ""MyPackage"" + @"Name: 'MyPackage' # A Comment in the file - Language: ""C++|1"" - Version: ""1.2.3"" + Language: 'C++|1' + Version: '1.2.3' EnableErrorsAsWarnings: false EnableCoolFeature: true Dependencies: { @@ -124,7 +124,7 @@ public void Deserialize_AllProperties() Test :[ 123 - false, ""string"" ] + false, 'string' ] }"; var actual = SMLManager.Deserialize(recipe); @@ -219,20 +219,20 @@ public void Deserialize_AllProperties() public async Task RoundTrip_AllProperties() { var expected = - @"Name: ""MyPackage"" + @"Name: 'MyPackage' # A Comment in the file - Language: ""C++|1"" - Version: ""1.2.3"" + Language: 'C++|1' + Version: '1.2.3' EnableErrorsAsWarnings: false EnableCoolFeature: true - ""Z@#1%"": ""Complex"" + 'Z@#1%': 'Complex' Dependencies: { Runtime:[], Build:[] Test :[ 123 - false, ""string"" ] + false, 'string' ] }"; var document = SMLManager.Deserialize(expected); diff --git a/Source/GenerateSharp/Utilities/SML/Grammar/SMLExtensions.cs b/Source/GenerateSharp/Utilities/SML/Grammar/SMLExtensions.cs index d2fad626f..e626e982b 100644 --- a/Source/GenerateSharp/Utilities/SML/Grammar/SMLExtensions.cs +++ b/Source/GenerateSharp/Utilities/SML/Grammar/SMLExtensions.cs @@ -23,7 +23,7 @@ public static void AddItemWithSyntax(this SMLArray array, string value, int inde // Create a new item and matching syntax var newValue = new SMLArrayValue(new SMLValue(new SMLStringValue( value, - new SMLToken("\"") + new SMLToken("'") { // Array items must have newline LeadingTrivia = new List() @@ -32,7 +32,7 @@ public static void AddItemWithSyntax(this SMLArray array, string value, int inde }, }, new SMLToken(value), - new SMLToken("\""))), + new SMLToken("'"))), new List()); // Update the previous last item to have a comma delimiter @@ -198,9 +198,9 @@ public static void AddItemWithSyntax(this SMLDocument document, string key, stri // Create a new item and matching syntax var newValue = new SMLValue(new SMLStringValue( value, - new SMLToken("\""), + new SMLToken("'"), new SMLToken(value), - new SMLToken("\""))); + new SMLToken("'"))); // Update the previous last item to have a comma delimiter if (document.Values.Count > 0) @@ -250,9 +250,9 @@ public static void AddItemWithSyntax(this SMLTable table, string key, string val // Create a new item and matching syntax var newValue = new SMLValue(new SMLStringValue( value, - new SMLToken("\""), + new SMLToken("'"), new SMLToken(value), - new SMLToken("\""))); + new SMLToken("'"))); // Tables items should be on newline var keyToken = new SMLToken(EnsureSafeKey(key)) @@ -276,9 +276,9 @@ public static void AddInlineItemWithSyntax(this SMLTable table, string key, stri // Create a new item and matching syntax var newValue = new SMLValue(new SMLStringValue( value, - new SMLToken("\""), + new SMLToken("'"), new SMLToken(value), - new SMLToken("\""))); + new SMLToken("'"))); // Tables items should be on newline var keyToken = new SMLToken(EnsureSafeKey(key)) @@ -485,7 +485,7 @@ private static string EnsureSafeKey(string name) // If the key contains unsafe characters, wrap in string key var keyTokenText = name; if (!SafeKeyRegex().IsMatch(keyTokenText)) - keyTokenText = $"\"{keyTokenText}\""; + keyTokenText = $"'{keyTokenText}'"; return keyTokenText; } diff --git a/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.cs b/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.cs index 051d6b4c0..09c95b9db 100644 --- a/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.cs +++ b/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.cs @@ -363,9 +363,9 @@ static SMLLexer() { 1,0,0,0,93,30,1,0,0,0,94,96,7,4,0,0,95,94,1,0,0,0,96,97,1,0,0,0,97,95, 1,0,0,0,97,98,1,0,0,0,98,32,1,0,0,0,99,102,3,3,1,0,100,102,3,5,2,0,101, 99,1,0,0,0,101,100,1,0,0,0,102,103,1,0,0,0,103,101,1,0,0,0,103,104,1,0, - 0,0,104,34,1,0,0,0,105,109,5,34,0,0,106,108,3,7,3,0,107,106,1,0,0,0,108, + 0,0,104,34,1,0,0,0,105,109,5,39,0,0,106,108,3,7,3,0,107,106,1,0,0,0,108, 111,1,0,0,0,109,110,1,0,0,0,109,107,1,0,0,0,110,112,1,0,0,0,111,109,1, - 0,0,0,112,113,5,34,0,0,113,36,1,0,0,0,114,116,7,5,0,0,115,114,1,0,0,0, + 0,0,0,112,113,5,39,0,0,113,36,1,0,0,0,114,116,7,5,0,0,115,114,1,0,0,0, 116,117,1,0,0,0,117,115,1,0,0,0,117,118,1,0,0,0,118,119,1,0,0,0,119,120, 6,18,0,0,120,38,1,0,0,0,10,0,71,79,83,92,97,101,103,109,117,1,0,1,0 }; diff --git a/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.interp b/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.interp index 39f430b5b..7c9a9f38a 100644 --- a/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.interp +++ b/Source/GenerateSharp/Utilities/SML/Grammar/SMLLexer.interp @@ -63,4 +63,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 15, 121, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 3, 12, 72, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 5, 13, 78, 8, 13, 10, 13, 12, 13, 81, 9, 13, 1, 13, 3, 13, 84, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 4, 14, 91, 8, 14, 11, 14, 12, 14, 92, 1, 15, 4, 15, 96, 8, 15, 11, 15, 12, 15, 97, 1, 16, 1, 16, 4, 16, 102, 8, 16, 11, 16, 12, 16, 103, 1, 17, 1, 17, 5, 17, 108, 8, 17, 10, 17, 12, 17, 111, 9, 17, 1, 17, 1, 17, 1, 18, 4, 18, 116, 8, 18, 11, 18, 12, 18, 117, 1, 18, 1, 18, 2, 79, 109, 0, 19, 1, 0, 3, 0, 5, 0, 7, 0, 9, 1, 11, 2, 13, 3, 15, 4, 17, 5, 19, 6, 21, 7, 23, 8, 25, 9, 27, 10, 29, 11, 31, 12, 33, 13, 35, 14, 37, 15, 1, 0, 6, 1, 0, 48, 57, 1, 0, 97, 122, 1, 0, 65, 90, 701, 0, 9, 9, 32, 126, 160, 172, 174, 887, 890, 895, 900, 906, 908, 908, 910, 929, 931, 1327, 1329, 1366, 1369, 1418, 1421, 1423, 1425, 1479, 1488, 1514, 1519, 1524, 1542, 1563, 1565, 1756, 1758, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2045, 2093, 2096, 2110, 2112, 2139, 2142, 2142, 2144, 2154, 2160, 2190, 2200, 2273, 2275, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2678, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2935, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3191, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3407, 3412, 3427, 3430, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3911, 3913, 3948, 3953, 3991, 3993, 4028, 4030, 4044, 4046, 4058, 4096, 4293, 4295, 4295, 4301, 4301, 4304, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5109, 5112, 5117, 5120, 5788, 5792, 5880, 5888, 5909, 5919, 5942, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6862, 6912, 6988, 6992, 7038, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7304, 7312, 7354, 7357, 7367, 7376, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8132, 8134, 8147, 8150, 8155, 8157, 8175, 8178, 8180, 8182, 8190, 8192, 8202, 8208, 8233, 8239, 8287, 8304, 8305, 8308, 8334, 8336, 8348, 8352, 8384, 8400, 8432, 8448, 8587, 8592, 9254, 9280, 9290, 9312, 11123, 11126, 11157, 11159, 11507, 11513, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11869, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12283, 12288, 12351, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12771, 12784, 12830, 12832, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43052, 43056, 43065, 43072, 43127, 43136, 43205, 43214, 43225, 43232, 43347, 43359, 43388, 43392, 43469, 43471, 43481, 43486, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43883, 43888, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64450, 64467, 64911, 64914, 64967, 64975, 64975, 65008, 65049, 65056, 65106, 65108, 65126, 65128, 65131, 65136, 65140, 65142, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65510, 65512, 65518, 65532, 65533, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65934, 65936, 65948, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66349, 66378, 66384, 66426, 66432, 66461, 66463, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66927, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67671, 67742, 67751, 67759, 67808, 67826, 67828, 67829, 67835, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68028, 68047, 68050, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68168, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 68736, 68786, 68800, 68850, 68858, 68903, 68912, 68921, 69216, 69246, 69248, 69289, 69291, 69293, 69296, 69297, 69376, 69415, 69424, 69465, 69488, 69513, 69552, 69579, 69600, 69622, 69632, 69709, 69714, 69749, 69759, 69820, 69822, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69959, 69968, 70006, 70016, 70111, 70113, 70132, 70144, 70161, 70163, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70313, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70747, 70749, 70753, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71133, 71168, 71236, 71248, 71257, 71264, 71276, 71296, 71353, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71494, 71680, 71739, 71840, 71922, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72006, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72164, 72192, 72263, 72272, 72354, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72773, 72784, 72812, 72816, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73464, 73648, 73648, 73664, 73713, 73727, 74649, 74752, 74862, 74864, 74868, 74880, 75075, 77712, 77810, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92782, 92862, 92864, 92873, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93017, 93019, 93025, 93027, 93047, 93053, 93071, 93760, 93850, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118528, 118573, 118576, 118598, 118608, 118723, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119274, 119296, 119365, 119520, 119539, 119552, 119638, 119648, 119672, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120779, 120782, 121483, 121499, 121503, 121505, 121519, 122624, 122654, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123215, 123536, 123566, 123584, 123641, 123647, 123647, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125127, 125142, 125184, 125259, 125264, 125273, 125278, 125279, 126065, 126132, 126209, 126269, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127167, 127169, 127183, 127185, 127221, 127232, 127405, 127462, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 128727, 128733, 128748, 128752, 128764, 128768, 128883, 128896, 128984, 128992, 129003, 129008, 129008, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 129200, 129201, 129280, 129619, 129632, 129645, 129648, 129652, 129656, 129660, 129664, 129670, 129680, 129708, 129712, 129722, 129728, 129733, 129744, 129753, 129760, 129767, 129776, 129782, 129792, 129938, 129940, 129994, 130032, 130041, 131072, 173791, 173824, 177976, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 196608, 201546, 917760, 917999, 733, 0, 48, 57, 65, 90, 97, 122, 170, 170, 178, 179, 181, 181, 185, 186, 188, 190, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1632, 1641, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1984, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2406, 2415, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2534, 2545, 2548, 2553, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2662, 2671, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2790, 2799, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2918, 2927, 2929, 2935, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3046, 3058, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3174, 3183, 3192, 3198, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3302, 3311, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3416, 3425, 3430, 3448, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3558, 3567, 3585, 3632, 3634, 3635, 3648, 3654, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3792, 3801, 3804, 3807, 3840, 3840, 3872, 3891, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4169, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4240, 4249, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4969, 4988, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6112, 6121, 6128, 6137, 6160, 6169, 6176, 6264, 6272, 6276, 6279, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6678, 6688, 6740, 6784, 6793, 6800, 6809, 6823, 6823, 6917, 6963, 6981, 6988, 6992, 7001, 7043, 7072, 7086, 7141, 7168, 7203, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8304, 8305, 8308, 8313, 8319, 8329, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8528, 8585, 9312, 9371, 9450, 9471, 10102, 10131, 11264, 11492, 11499, 11502, 11506, 11507, 11517, 11517, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12690, 12693, 12704, 12735, 12784, 12799, 12832, 12841, 12872, 12879, 12881, 12895, 12928, 12937, 12977, 12991, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43056, 43061, 43072, 43123, 43138, 43187, 43216, 43225, 43250, 43255, 43259, 43259, 43261, 43262, 43264, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43481, 43488, 43492, 43494, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43600, 43609, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65799, 65843, 65856, 65912, 65930, 65931, 66176, 66204, 66208, 66256, 66273, 66299, 66304, 66339, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67672, 67702, 67705, 67742, 67751, 67759, 67808, 67826, 67828, 67829, 67835, 67867, 67872, 67897, 67968, 68023, 68028, 68047, 68050, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68160, 68168, 68192, 68222, 68224, 68255, 68288, 68295, 68297, 68324, 68331, 68335, 68352, 68405, 68416, 68437, 68440, 68466, 68472, 68497, 68521, 68527, 68608, 68680, 68736, 68786, 68800, 68850, 68858, 68899, 68912, 68921, 69216, 69246, 69248, 69289, 69296, 69297, 69376, 69415, 69424, 69445, 69457, 69460, 69488, 69505, 69552, 69579, 69600, 69622, 69635, 69687, 69714, 69743, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69872, 69881, 69891, 69926, 69942, 69951, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70096, 70106, 70108, 70108, 70113, 70132, 70144, 70161, 70163, 70187, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70384, 70393, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70736, 70745, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 70864, 70873, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71248, 71257, 71296, 71338, 71352, 71352, 71360, 71369, 71424, 71450, 71472, 71483, 71488, 71494, 71680, 71723, 71840, 71922, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72016, 72025, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72784, 72812, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73120, 73129, 73440, 73458, 73648, 73648, 73664, 73684, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92928, 92975, 92992, 92995, 93008, 93017, 93019, 93025, 93027, 93047, 93053, 93071, 93760, 93846, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119520, 119539, 119648, 119672, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 122624, 122654, 123136, 123180, 123191, 123197, 123200, 123209, 123214, 123214, 123536, 123565, 123584, 123627, 123632, 123641, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125127, 125135, 125184, 125251, 125259, 125259, 125264, 125273, 126065, 126123, 126125, 126127, 126129, 126132, 126209, 126253, 126255, 126269, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127232, 127244, 130032, 130041, 131072, 173791, 173824, 177976, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 196608, 201546, 2, 0, 9, 9, 32, 32, 125, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 1, 39, 1, 0, 0, 0, 3, 41, 1, 0, 0, 0, 5, 43, 1, 0, 0, 0, 7, 45, 1, 0, 0, 0, 9, 47, 1, 0, 0, 0, 11, 49, 1, 0, 0, 0, 13, 51, 1, 0, 0, 0, 15, 53, 1, 0, 0, 0, 17, 55, 1, 0, 0, 0, 19, 57, 1, 0, 0, 0, 21, 59, 1, 0, 0, 0, 23, 64, 1, 0, 0, 0, 25, 71, 1, 0, 0, 0, 27, 75, 1, 0, 0, 0, 29, 90, 1, 0, 0, 0, 31, 95, 1, 0, 0, 0, 33, 101, 1, 0, 0, 0, 35, 105, 1, 0, 0, 0, 37, 115, 1, 0, 0, 0, 39, 40, 7, 0, 0, 0, 40, 2, 1, 0, 0, 0, 41, 42, 7, 1, 0, 0, 42, 4, 1, 0, 0, 0, 43, 44, 7, 2, 0, 0, 44, 6, 1, 0, 0, 0, 45, 46, 7, 3, 0, 0, 46, 8, 1, 0, 0, 0, 47, 48, 5, 58, 0, 0, 48, 10, 1, 0, 0, 0, 49, 50, 5, 91, 0, 0, 50, 12, 1, 0, 0, 0, 51, 52, 5, 93, 0, 0, 52, 14, 1, 0, 0, 0, 53, 54, 5, 123, 0, 0, 54, 16, 1, 0, 0, 0, 55, 56, 5, 125, 0, 0, 56, 18, 1, 0, 0, 0, 57, 58, 5, 44, 0, 0, 58, 20, 1, 0, 0, 0, 59, 60, 5, 116, 0, 0, 60, 61, 5, 114, 0, 0, 61, 62, 5, 117, 0, 0, 62, 63, 5, 101, 0, 0, 63, 22, 1, 0, 0, 0, 64, 65, 5, 102, 0, 0, 65, 66, 5, 97, 0, 0, 66, 67, 5, 108, 0, 0, 67, 68, 5, 115, 0, 0, 68, 69, 5, 101, 0, 0, 69, 24, 1, 0, 0, 0, 70, 72, 5, 13, 0, 0, 71, 70, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 73, 1, 0, 0, 0, 73, 74, 5, 10, 0, 0, 74, 26, 1, 0, 0, 0, 75, 79, 5, 35, 0, 0, 76, 78, 9, 0, 0, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 84, 5, 13, 0, 0, 83, 82, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 86, 5, 10, 0, 0, 86, 87, 1, 0, 0, 0, 87, 88, 6, 13, 0, 0, 88, 28, 1, 0, 0, 0, 89, 91, 3, 1, 0, 0, 90, 89, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 30, 1, 0, 0, 0, 94, 96, 7, 4, 0, 0, 95, 94, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 32, 1, 0, 0, 0, 99, 102, 3, 3, 1, 0, 100, 102, 3, 5, 2, 0, 101, 99, 1, 0, 0, 0, 101, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 34, 1, 0, 0, 0, 105, 109, 5, 34, 0, 0, 106, 108, 3, 7, 3, 0, 107, 106, 1, 0, 0, 0, 108, 111, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 109, 107, 1, 0, 0, 0, 110, 112, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 112, 113, 5, 34, 0, 0, 113, 36, 1, 0, 0, 0, 114, 116, 7, 5, 0, 0, 115, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 6, 18, 0, 0, 120, 38, 1, 0, 0, 0, 10, 0, 71, 79, 83, 92, 97, 101, 103, 109, 117, 1, 0, 1, 0] \ No newline at end of file +[4, 0, 15, 121, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 3, 12, 72, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 5, 13, 78, 8, 13, 10, 13, 12, 13, 81, 9, 13, 1, 13, 3, 13, 84, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 4, 14, 91, 8, 14, 11, 14, 12, 14, 92, 1, 15, 4, 15, 96, 8, 15, 11, 15, 12, 15, 97, 1, 16, 1, 16, 4, 16, 102, 8, 16, 11, 16, 12, 16, 103, 1, 17, 1, 17, 5, 17, 108, 8, 17, 10, 17, 12, 17, 111, 9, 17, 1, 17, 1, 17, 1, 18, 4, 18, 116, 8, 18, 11, 18, 12, 18, 117, 1, 18, 1, 18, 2, 79, 109, 0, 19, 1, 0, 3, 0, 5, 0, 7, 0, 9, 1, 11, 2, 13, 3, 15, 4, 17, 5, 19, 6, 21, 7, 23, 8, 25, 9, 27, 10, 29, 11, 31, 12, 33, 13, 35, 14, 37, 15, 1, 0, 6, 1, 0, 48, 57, 1, 0, 97, 122, 1, 0, 65, 90, 701, 0, 9, 9, 32, 126, 160, 172, 174, 887, 890, 895, 900, 906, 908, 908, 910, 929, 931, 1327, 1329, 1366, 1369, 1418, 1421, 1423, 1425, 1479, 1488, 1514, 1519, 1524, 1542, 1563, 1565, 1756, 1758, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2045, 2093, 2096, 2110, 2112, 2139, 2142, 2142, 2144, 2154, 2160, 2190, 2200, 2273, 2275, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2678, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2935, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3191, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3407, 3412, 3427, 3430, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3911, 3913, 3948, 3953, 3991, 3993, 4028, 4030, 4044, 4046, 4058, 4096, 4293, 4295, 4295, 4301, 4301, 4304, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5109, 5112, 5117, 5120, 5788, 5792, 5880, 5888, 5909, 5919, 5942, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6862, 6912, 6988, 6992, 7038, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7304, 7312, 7354, 7357, 7367, 7376, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8132, 8134, 8147, 8150, 8155, 8157, 8175, 8178, 8180, 8182, 8190, 8192, 8202, 8208, 8233, 8239, 8287, 8304, 8305, 8308, 8334, 8336, 8348, 8352, 8384, 8400, 8432, 8448, 8587, 8592, 9254, 9280, 9290, 9312, 11123, 11126, 11157, 11159, 11507, 11513, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11869, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12283, 12288, 12351, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12771, 12784, 12830, 12832, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43052, 43056, 43065, 43072, 43127, 43136, 43205, 43214, 43225, 43232, 43347, 43359, 43388, 43392, 43469, 43471, 43481, 43486, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43883, 43888, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64450, 64467, 64911, 64914, 64967, 64975, 64975, 65008, 65049, 65056, 65106, 65108, 65126, 65128, 65131, 65136, 65140, 65142, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65510, 65512, 65518, 65532, 65533, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65934, 65936, 65948, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66349, 66378, 66384, 66426, 66432, 66461, 66463, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66927, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67671, 67742, 67751, 67759, 67808, 67826, 67828, 67829, 67835, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68028, 68047, 68050, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68168, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 68736, 68786, 68800, 68850, 68858, 68903, 68912, 68921, 69216, 69246, 69248, 69289, 69291, 69293, 69296, 69297, 69376, 69415, 69424, 69465, 69488, 69513, 69552, 69579, 69600, 69622, 69632, 69709, 69714, 69749, 69759, 69820, 69822, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69959, 69968, 70006, 70016, 70111, 70113, 70132, 70144, 70161, 70163, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70313, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70747, 70749, 70753, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71133, 71168, 71236, 71248, 71257, 71264, 71276, 71296, 71353, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71494, 71680, 71739, 71840, 71922, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72006, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72164, 72192, 72263, 72272, 72354, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72773, 72784, 72812, 72816, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73464, 73648, 73648, 73664, 73713, 73727, 74649, 74752, 74862, 74864, 74868, 74880, 75075, 77712, 77810, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92782, 92862, 92864, 92873, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93017, 93019, 93025, 93027, 93047, 93053, 93071, 93760, 93850, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118528, 118573, 118576, 118598, 118608, 118723, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119274, 119296, 119365, 119520, 119539, 119552, 119638, 119648, 119672, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120779, 120782, 121483, 121499, 121503, 121505, 121519, 122624, 122654, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123215, 123536, 123566, 123584, 123641, 123647, 123647, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125127, 125142, 125184, 125259, 125264, 125273, 125278, 125279, 126065, 126132, 126209, 126269, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127167, 127169, 127183, 127185, 127221, 127232, 127405, 127462, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 128727, 128733, 128748, 128752, 128764, 128768, 128883, 128896, 128984, 128992, 129003, 129008, 129008, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 129200, 129201, 129280, 129619, 129632, 129645, 129648, 129652, 129656, 129660, 129664, 129670, 129680, 129708, 129712, 129722, 129728, 129733, 129744, 129753, 129760, 129767, 129776, 129782, 129792, 129938, 129940, 129994, 130032, 130041, 131072, 173791, 173824, 177976, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 196608, 201546, 917760, 917999, 733, 0, 48, 57, 65, 90, 97, 122, 170, 170, 178, 179, 181, 181, 185, 186, 188, 190, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1632, 1641, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1984, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2406, 2415, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2534, 2545, 2548, 2553, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2662, 2671, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2790, 2799, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2918, 2927, 2929, 2935, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3046, 3058, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3174, 3183, 3192, 3198, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3302, 3311, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3416, 3425, 3430, 3448, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3558, 3567, 3585, 3632, 3634, 3635, 3648, 3654, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3792, 3801, 3804, 3807, 3840, 3840, 3872, 3891, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4169, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4240, 4249, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4969, 4988, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6112, 6121, 6128, 6137, 6160, 6169, 6176, 6264, 6272, 6276, 6279, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6678, 6688, 6740, 6784, 6793, 6800, 6809, 6823, 6823, 6917, 6963, 6981, 6988, 6992, 7001, 7043, 7072, 7086, 7141, 7168, 7203, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8304, 8305, 8308, 8313, 8319, 8329, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8528, 8585, 9312, 9371, 9450, 9471, 10102, 10131, 11264, 11492, 11499, 11502, 11506, 11507, 11517, 11517, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12690, 12693, 12704, 12735, 12784, 12799, 12832, 12841, 12872, 12879, 12881, 12895, 12928, 12937, 12977, 12991, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43056, 43061, 43072, 43123, 43138, 43187, 43216, 43225, 43250, 43255, 43259, 43259, 43261, 43262, 43264, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43481, 43488, 43492, 43494, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43600, 43609, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65799, 65843, 65856, 65912, 65930, 65931, 66176, 66204, 66208, 66256, 66273, 66299, 66304, 66339, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67672, 67702, 67705, 67742, 67751, 67759, 67808, 67826, 67828, 67829, 67835, 67867, 67872, 67897, 67968, 68023, 68028, 68047, 68050, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68160, 68168, 68192, 68222, 68224, 68255, 68288, 68295, 68297, 68324, 68331, 68335, 68352, 68405, 68416, 68437, 68440, 68466, 68472, 68497, 68521, 68527, 68608, 68680, 68736, 68786, 68800, 68850, 68858, 68899, 68912, 68921, 69216, 69246, 69248, 69289, 69296, 69297, 69376, 69415, 69424, 69445, 69457, 69460, 69488, 69505, 69552, 69579, 69600, 69622, 69635, 69687, 69714, 69743, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69872, 69881, 69891, 69926, 69942, 69951, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70096, 70106, 70108, 70108, 70113, 70132, 70144, 70161, 70163, 70187, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70384, 70393, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70736, 70745, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 70864, 70873, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71248, 71257, 71296, 71338, 71352, 71352, 71360, 71369, 71424, 71450, 71472, 71483, 71488, 71494, 71680, 71723, 71840, 71922, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72016, 72025, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72784, 72812, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73120, 73129, 73440, 73458, 73648, 73648, 73664, 73684, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92928, 92975, 92992, 92995, 93008, 93017, 93019, 93025, 93027, 93047, 93053, 93071, 93760, 93846, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119520, 119539, 119648, 119672, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 122624, 122654, 123136, 123180, 123191, 123197, 123200, 123209, 123214, 123214, 123536, 123565, 123584, 123627, 123632, 123641, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125127, 125135, 125184, 125251, 125259, 125259, 125264, 125273, 126065, 126123, 126125, 126127, 126129, 126132, 126209, 126253, 126255, 126269, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127232, 127244, 130032, 130041, 131072, 173791, 173824, 177976, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 196608, 201546, 2, 0, 9, 9, 32, 32, 125, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 1, 39, 1, 0, 0, 0, 3, 41, 1, 0, 0, 0, 5, 43, 1, 0, 0, 0, 7, 45, 1, 0, 0, 0, 9, 47, 1, 0, 0, 0, 11, 49, 1, 0, 0, 0, 13, 51, 1, 0, 0, 0, 15, 53, 1, 0, 0, 0, 17, 55, 1, 0, 0, 0, 19, 57, 1, 0, 0, 0, 21, 59, 1, 0, 0, 0, 23, 64, 1, 0, 0, 0, 25, 71, 1, 0, 0, 0, 27, 75, 1, 0, 0, 0, 29, 90, 1, 0, 0, 0, 31, 95, 1, 0, 0, 0, 33, 101, 1, 0, 0, 0, 35, 105, 1, 0, 0, 0, 37, 115, 1, 0, 0, 0, 39, 40, 7, 0, 0, 0, 40, 2, 1, 0, 0, 0, 41, 42, 7, 1, 0, 0, 42, 4, 1, 0, 0, 0, 43, 44, 7, 2, 0, 0, 44, 6, 1, 0, 0, 0, 45, 46, 7, 3, 0, 0, 46, 8, 1, 0, 0, 0, 47, 48, 5, 58, 0, 0, 48, 10, 1, 0, 0, 0, 49, 50, 5, 91, 0, 0, 50, 12, 1, 0, 0, 0, 51, 52, 5, 93, 0, 0, 52, 14, 1, 0, 0, 0, 53, 54, 5, 123, 0, 0, 54, 16, 1, 0, 0, 0, 55, 56, 5, 125, 0, 0, 56, 18, 1, 0, 0, 0, 57, 58, 5, 44, 0, 0, 58, 20, 1, 0, 0, 0, 59, 60, 5, 116, 0, 0, 60, 61, 5, 114, 0, 0, 61, 62, 5, 117, 0, 0, 62, 63, 5, 101, 0, 0, 63, 22, 1, 0, 0, 0, 64, 65, 5, 102, 0, 0, 65, 66, 5, 97, 0, 0, 66, 67, 5, 108, 0, 0, 67, 68, 5, 115, 0, 0, 68, 69, 5, 101, 0, 0, 69, 24, 1, 0, 0, 0, 70, 72, 5, 13, 0, 0, 71, 70, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 73, 1, 0, 0, 0, 73, 74, 5, 10, 0, 0, 74, 26, 1, 0, 0, 0, 75, 79, 5, 35, 0, 0, 76, 78, 9, 0, 0, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 84, 5, 13, 0, 0, 83, 82, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 86, 5, 10, 0, 0, 86, 87, 1, 0, 0, 0, 87, 88, 6, 13, 0, 0, 88, 28, 1, 0, 0, 0, 89, 91, 3, 1, 0, 0, 90, 89, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 30, 1, 0, 0, 0, 94, 96, 7, 4, 0, 0, 95, 94, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 32, 1, 0, 0, 0, 99, 102, 3, 3, 1, 0, 100, 102, 3, 5, 2, 0, 101, 99, 1, 0, 0, 0, 101, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 34, 1, 0, 0, 0, 105, 109, 5, 39, 0, 0, 106, 108, 3, 7, 3, 0, 107, 106, 1, 0, 0, 0, 108, 111, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 109, 107, 1, 0, 0, 0, 110, 112, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 112, 113, 5, 39, 0, 0, 113, 36, 1, 0, 0, 0, 114, 116, 7, 5, 0, 0, 115, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 6, 18, 0, 0, 120, 38, 1, 0, 0, 0, 10, 0, 71, 79, 83, 92, 97, 101, 103, 109, 117, 1, 0, 1, 0] \ No newline at end of file diff --git a/Source/GenerateSharp/Utilities/SML/SMLValueTableVisitor.cs b/Source/GenerateSharp/Utilities/SML/SMLValueTableVisitor.cs index 893d473a4..ca2873f9b 100644 --- a/Source/GenerateSharp/Utilities/SML/SMLValueTableVisitor.cs +++ b/Source/GenerateSharp/Utilities/SML/SMLValueTableVisitor.cs @@ -175,12 +175,12 @@ public virtual object VisitValueString(SMLParser.ValueStringContext context) var literal = context.STRING_LITERAL().Symbol.Text; var content = literal[1..^1]; - var openQuoteToken = new SMLToken("\"") + var openQuoteToken = new SMLToken("'") { LeadingTrivia = GetLeadingTrivia(context.STRING_LITERAL()), }; var contentToken = new SMLToken(content); - var closeQuoteToken = new SMLToken("\""); + var closeQuoteToken = new SMLToken("'"); // Cache the last seen token _lastToken = closeQuoteToken; diff --git a/Source/GenerateSharp/Utilities/ValueTable/ValueTable.cs b/Source/GenerateSharp/Utilities/ValueTable/ValueTable.cs index bf102a20a..cd55a1d97 100644 --- a/Source/GenerateSharp/Utilities/ValueTable/ValueTable.cs +++ b/Source/GenerateSharp/Utilities/ValueTable/ValueTable.cs @@ -80,9 +80,9 @@ public override string ToString() _ = builder.Append("{ "); foreach (var value in this) { - _ = builder.Append('\"'); + _ = builder.Append('\''); _ = builder.Append(value.Key); - _ = builder.Append("\": "); + _ = builder.Append("': "); _ = builder.Append(value.Value); _ = builder.Append(", "); } diff --git a/Source/Grammar/SML.g4 b/Source/Grammar/SML.g4 index 228262db6..c3747227f 100644 --- a/Source/Grammar/SML.g4 +++ b/Source/Grammar/SML.g4 @@ -46,5 +46,5 @@ COMMENT : '#'.*?'\r'?'\n' -> channel(HIDDEN) ; INTEGER : DIGIT+ ; KEY_LITERAL : [\p{L}\p{N}]+ ; WORD : (LOWERCASE | UPPERCASE)+ ; -STRING_LITERAL : '"' BASIC_CHAR*? '"' ; +STRING_LITERAL : '\'' BASIC_CHAR*? '\'' ; WHITESPACE : (' '|'\t')+ -> channel(HIDDEN) ; diff --git a/Source/Installer/SoupInstaller/Setup.cs b/Source/Installer/SoupInstaller/Setup.cs index 2cc1db7b5..fd3778be8 100644 --- a/Source/Installer/SoupInstaller/Setup.cs +++ b/Source/Installer/SoupInstaller/Setup.cs @@ -5,7 +5,7 @@ class Script { static public void Main() { - var soupVersion = new Version(0, 36, 0); + var soupVersion = new Version(0, 37, 0); var soupOutFolder = "../../../out"; var soupRunFolder = $"{soupOutFolder}/run"; diff --git a/Source/Monitor/Client/PackageLock.sml b/Source/Monitor/Client/PackageLock.sml index ddd9e5b7b..8427a4d6e 100644 --- a/Source/Monitor/Client/PackageLock.sml +++ b/Source/Monitor/Client/PackageLock.sml @@ -1,22 +1,22 @@ Version: 5 Closures: { Root: { - "C++": { - "Monitor.Client": { Version: "../Client", Build: "Build0", Tool: "Tool0" } - "Monitor.Shared": { Version: "../Shared/", Build: "Build0", Tool: "Tool0" } - "mwasplund|Detours": { Version: "4.0.11", Build: "Build0", Tool: "Tool0" } - "mwasplund|Opal": { Version: "0.9.5", Build: "Build0", Tool: "Tool0" } + 'C++': { + 'Monitor.Client': { Version: '../Client', Build: 'Build0', Tool: 'Tool0' } + 'Monitor.Shared': { Version: '../Shared/', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Detours': { Version: '4.0.11', Build: 'Build0', Tool: 'Tool0' } + 'mwasplund|Opal': { Version: '0.10.0', Build: 'Build0', Tool: 'Tool0' } } } Build0: { Wren: { - "mwasplund|Soup.Cpp": { Version: "0.11.0" } + 'mwasplund|Soup.Cpp': { Version: '0.12.0' } } } Tool0: { - "C++": { - "mwasplund|copy": { Version: "1.0.0" } - "mwasplund|mkdir": { Version: "1.0.0" } + 'C++': { + 'mwasplund|copy': { Version: '1.0.0' } + 'mwasplund|mkdir': { Version: '1.0.0' } } } } \ No newline at end of file diff --git a/Source/Monitor/Client/Recipe.sml b/Source/Monitor/Client/Recipe.sml index 4186ecaae..deacc1e23 100644 --- a/Source/Monitor/Client/Recipe.sml +++ b/Source/Monitor/Client/Recipe.sml @@ -1,20 +1,20 @@ -Name: "Monitor.Client" -Description: "The Detours dynamic library that is injected into a child process to intercept system calls." -Language: "C++|0" -Version: "1.0.0" -Type: "DynamicLibrary" +Name: 'Monitor.Client' +Description: 'The Detours dynamic library that is injected into a child process to intercept system calls.' +Language: 'C++|0' +Version: '1.0.0' +Type: 'DynamicLibrary' Defines: [ - # "ENABLE_MONITOR_DEBUG" - # "TRACE_DETOUR_CLIENT" + # 'ENABLE_MONITOR_DEBUG' + # 'TRACE_DETOUR_CLIENT' ] Source: [ - "Main.cpp" + 'Main.cpp' ] Dependencies: { Runtime: [ - "mwasplund|Detours@4" - "../Shared/" - "mwasplund|Opal@0" + 'mwasplund|Detours@4' + '../Shared/' + 'mwasplund|Opal@0' ] } diff --git a/Source/Monitor/Host/Recipe.sml b/Source/Monitor/Host/Recipe.sml index 83f1a423e..e0091bb89 100644 --- a/Source/Monitor/Host/Recipe.sml +++ b/Source/Monitor/Host/Recipe.sml @@ -1,15 +1,15 @@ -Name: "Monitor.Host" -Language: "C++|0" -Version: "1.0.0" +Name: 'Monitor.Host' +Language: 'C++|0' +Version: '1.0.0' Defines: [ - # "TRACE_DETOUR_SERVER" + # 'TRACE_DETOUR_SERVER' ] -Interface: "Module.cpp" +Interface: 'Module.cpp' Dependencies: { Runtime: [ - "mwasplund|Detours@4" - "../Shared/" - "mwasplund|Opal@0" + 'mwasplund|Detours@4' + '../Shared/' + 'mwasplund|Opal@0' ] } diff --git a/Source/Monitor/Shared/Recipe.sml b/Source/Monitor/Shared/Recipe.sml index 576cce6e6..0604fbed7 100644 --- a/Source/Monitor/Shared/Recipe.sml +++ b/Source/Monitor/Shared/Recipe.sml @@ -1,5 +1,5 @@ -Name: "Monitor.Shared" -Description: "The shared resources that are used from both the detoured process and the monitor manager." -Language: "C++|0.1" -Version: "1.0.0" -Interface: "Module.cpp" +Name: 'Monitor.Shared' +Description: 'The shared resources that are used from both the detoured process and the monitor manager.' +Language: 'C++|0.1' +Version: '1.0.0' +Interface: 'Module.cpp' diff --git a/Source/Tools/Copy/Recipe.sml b/Source/Tools/Copy/Recipe.sml index 52cb4edbe..54b4aa6ef 100644 --- a/Source/Tools/Copy/Recipe.sml +++ b/Source/Tools/Copy/Recipe.sml @@ -1,7 +1,7 @@ -Name: "copy" -Language: "C++|0.1" -Version: "1.0.0" -Type: "Executable" +Name: 'copy' +Language: 'C++|0' +Version: '1.1.0' +Type: 'Executable' Source: [ - "Main.cpp" + 'Main.cpp' ] diff --git a/Source/Tools/Mkdir/Recipe.sml b/Source/Tools/Mkdir/Recipe.sml index 65e92b3b8..ef671cfc3 100644 --- a/Source/Tools/Mkdir/Recipe.sml +++ b/Source/Tools/Mkdir/Recipe.sml @@ -1,12 +1,12 @@ -Name: "mkdir" -Language: "C++|0" -Version: "1.0.0" -Type: "Executable" +Name: 'mkdir' +Language: 'C++|0' +Version: '1.1.0' +Type: 'Executable' Source: [ - "Main.cpp" + 'Main.cpp' ] Dependencies: { Runtime: [ - "mwasplund|Opal@0" + 'mwasplund|Opal@0' ] } \ No newline at end of file