Skip to content

Commit

Permalink
Add Sub Closures for Builds (#129)
Browse files Browse the repository at this point in the history
* Add package lock version

* Require language version in recipe

* Add build extension utils project

* Make the version number an optional thing

* Update to use static regex

* Add ability to discover dotnet sdk runtime version

* Add version to extension store

Co-authored-by: Matthew Asplund <[email protected]>
  • Loading branch information
mwasplund and Matthew Asplund authored Sep 3, 2022
1 parent 843087d commit 9966026
Show file tree
Hide file tree
Showing 93 changed files with 1,474 additions and 643 deletions.
4 changes: 2 additions & 2 deletions Docs/Architecture/Recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Name = "MyAwesomePackage"
```

### Language
The **Language** property is required for all packages. It consists of a string value that contains the language type. This language tells Soup what default [Build Tasks](Build-Task.md) to inject into the build.
The **Language** property is required for all packages. It consists of a string value that contains the language type and minimum build version. This language tells Soup what default [Build Tasks](Build-Task.md) to inject into the build.
```
Language = "C#"
Language = "C#|0.1"
```

### Version
Expand Down
4 changes: 2 additions & 2 deletions Docs/CLI/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Install the latest `json11` package and register it in the MyProject Recipe file
soup install MyProject/ json11
```

Install version `1.0.1` of the `json11` package and register it in the current folder Recipe file.
Install version `1.0.2` of the `json11` package and register it in the current folder Recipe file.
```
soup install [email protected].1
soup install [email protected].2
```
5 changes: 2 additions & 3 deletions Docs/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Note: While Clang will work, there is still work to auto-detect an installation
## Requirements
* Windows 10
* Build Tools
* [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) with "Desktop development with c++" workload.
* [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) with "Desktop development with c++" workload.
* OR
* [Build Tools For Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with "c++ build tools" workload.
* [Build Tools For Visual Studio 2022](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) with "c++ build tools" workload.
* [Latest Release](https://github.com/mwasplund/Soup/releases/latest)

## Setup
Expand All @@ -32,7 +32,6 @@ You can either install Soup or download a reference the archive.
Or add it to the "Path" System Environment Variable to always have it available!

## Setup SDKs

Use the SWhere tool to find the latest installed version of the SDKs on your local machine (listed in the dependencies list).

```
Expand Down
8 changes: 4 additions & 4 deletions Docs/Samples/CSharp/Build-Extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ This is a console application that has a custom build extension that alters the
The Recipe file that defines the build extension dynamic library "Samples.BuildExtension.Extension" that will register new build tasks.
```
Name = "Samples.CSharp.BuildExtension.Extension"
Language = "C#"
Language = "C#|0.1"
Version = "1.0.0"
Source = [
"CustomBuildTask.cs"
]
[Dependencies]
Runtime = [
{ Reference = "[email protected].3", ExcludeRuntime = true },
{ Reference = "[email protected].4", ExcludeRuntime = true },
{ Reference = "[email protected]" },
{ Reference = "[email protected].1" },
{ Reference = "[email protected].3" },
]
```

Expand Down Expand Up @@ -82,7 +82,7 @@ namespace Samples.CSharp.BuildExtension.Extension
The Recipe file that defines the executable "BuildExtension.Executable". The one interesting part is the relative path reference to the custom build extension through "Build" Dependencies.
```
Name = "Samples.CSharp.BuildExtension.Executable"
Language = "C#"
Language = "C#|0.1"
Type = "Executable"
Version = "1.0.1"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Docs/Samples/CSharp/Console-Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a console application with the minimal amount of code to get up and runn
The Recipe file that defines the static library ""Samples.CSharp.ConsoleApplication".
```
Name = "Samples.CSharp.ConsoleApplication"
Language = "C#"
Language = "C#|0.1"
Type = "Executable"
Version = "1.1.4"
Source = [
Expand Down
8 changes: 4 additions & 4 deletions Docs/Samples/Cpp/Build-Extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ This is a console application that has a custom build extension that alters the
The Recipe file that defines the build extension dynamic library "Samples.Cpp.BuildExtension.Extension" that will register new build tasks.
```
Name = "Samples.Cpp.BuildExtension.Extension"
Language = "C#"
Language = "C#|0.1"
Version = "1.0.0"
Source = [
"CustomBuildTask.cs"
]
[Dependencies]
Runtime = [
{ Reference = "[email protected].3", ExcludeRuntime = true },
{ Reference = "[email protected].4", ExcludeRuntime = true },
{ Reference = "[email protected]" },
{ Reference = "[email protected].1" },
{ Reference = "[email protected].3" },
]
```

Expand Down Expand Up @@ -82,7 +82,7 @@ namespace Samples.Cpp.BuildExtension.Extension
The Recipe file that defines the executable "Samples.Cpp.BuildExtension.Executable". The one interesting part is the relative path reference to the custom build extension through "Build" Dependencies.
```
Name = "Samples.Cpp.BuildExtension.Executable"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.0.1"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Docs/Samples/Cpp/Console-Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is the smallest amount of code to get a console application building using
The Recipe file that sets the name, type, version and the single source file.
```
Name = "Samples.Cpp.ConsoleApplication"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.1.3"
Source = [
Expand Down
4 changes: 2 additions & 2 deletions Docs/Samples/Cpp/Dynamic-Library.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a console application that has a single dynamic library dependency.
The Recipe file that defines the static library "Samples.Cpp.DynamicLibrary.Library".
```
Name = "Samples.Cpp.DynamicLibrary.Library"
Language = "C++"
Language = "C++|0.1"
Version = "1.0.0"
Interface = "Module.cpp"
```
Expand Down Expand Up @@ -40,7 +40,7 @@ export namespace Samples.Cpp.DynamicLibrary.Library
The Recipe file that defines the executable "Samples.Cpp.DynamicLibrary.Application".
```
Name = "Samples.Cpp.DynamicLibrary.Application"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.0.0"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Docs/Samples/Cpp/Module-Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A console application that uses a single module interface file used inside the s
The Recipe file that sets the name, type, version, the public interface module and the single source file.
```
Name = "Samples.Cpp.ModuleInterface"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.2.5"
Interface = "Module.cpp"
Expand Down
4 changes: 2 additions & 2 deletions Docs/Samples/Cpp/Parse-Json-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A console application that reads in a json file using the an external module and
The Recipe file that sets the standard name, type, version, as well as the single external dependency of the [json11](https://github.com/dropbox/json11) project.
```
Name = "Samples.Cpp.ParseJsonFile"
Language = "C++"
Language = "C++|0.1"
Version = "1.0.0"
Type = "Executable"
Source = [
Expand All @@ -16,7 +16,7 @@ Source = [
[Dependencies]
Runtime = [
"[email protected].1",
"[email protected].2",
]
```

Expand Down
4 changes: 2 additions & 2 deletions Docs/Samples/Cpp/Static-Library.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a console application that has a single static library dependency.
The Recipe file that defines the static library "Samples.Cpp.StaticLibrary.Library".
```
Name = "Samples.Cpp.StaticLibrary.Library"
Language = "C++"
Language = "C++|0.1"
Version = "1.0.0"
Interface = "Module.cpp"
```
Expand Down Expand Up @@ -40,7 +40,7 @@ export namespace Samples.Cpp.StaticLibrary.Library
The Recipe file that defines the executable "Samples.Cpp.StaticLibrary.Application".
```
Name = "Samples.Cpp.StaticLibrary.Application"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.0.0"
Source = [
Expand Down
30 changes: 30 additions & 0 deletions PackageLock.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[Closures]
[RootClosure]
"C++" = [
{ Name = "Soup", Version = "./" },
{ Name = "Soup.Core", Version = "../Core/" },
{ Name = "json11", Version = "1.0.1" },
{ Name = "Opal", Version = "0.3.1" },
{ Name = "toml11", Version = "1.0.1" },
{ Name = "Monitor.Host", Version = "../../Monitor/Host/" },
{ Name = "Detours", Version = "4.0.2" },
{ Name = "Monitor.Shared", Version = "../../../Monitor/Shared/" },
{ Name = "CryptoPP", Version = "1.0.1" },
{ Name = "Soup.Test.Assert", Version = "0.1.8" },
{ Name = "copy", Version = "../../Tools/Copy/" },
{ Name = "mkdir", Version = "../../Tools/Mkdir/" },
]

[BuildClosure_1]
"C#" = [
{ Name = "Soup.Test.Cpp", Version = "0.2.0" },
{ Name = "Opal", Version = "1.0.2" },
{ Name = "Soup.Build", Version = "0.1.3" },
{ Name = "Soup.Build.Extensions", Version = "0.2.0" },
{ Name = "Soup.Cpp.Compiler", Version = "0.3.0" },
{ Name = "Soup.Cpp.Compiler.MSVC", Version = "0.3.0" },
{ Name = "Soup.Cpp", Version = "0.2.0" },
{ Name = "Soup.CSharp", Version = "0.4.0" },
{ Name = "Soup.CSharp.Compiler", Version = "0.4.0" },
{ Name = "Soup.CSharp.Compiler.Roslyn", Version = "0.4.0" },
]
11 changes: 6 additions & 5 deletions Samples/CSharp/BuildExtension/Executable/PackageLock.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Version = 1
[Projects]
"C#" = [
{ Name = "Samples.CSharp.BuildExtension.Executable", Version = "C:/Users/mwasp/source/repos/Soup/Samples/CSharp/BuildExtension/Executable" },
{ Name = "Samples.CSharp.BuildExtension.Extension", Version = "C:/Users/mwasp/source/repos/Soup/Samples/CSharp/BuildExtension/Extension/" },
{ Name = "Soup.Build", Version = "Soup.Build@0.1.3" },
{ Name = "Soup.Build.Extensions", Version = "[email protected]" },
{ Name = "Opal", Version = "Opal@1.0.1" },
{ Name = "Samples.CSharp.BuildExtension.Executable", Version = "../Executable" },
{ Name = "Samples.CSharp.BuildExtension.Extension", Version = "../Extension/" },
{ Name = "Soup.Build", Version = "0.1.4" },
{ Name = "Soup.Build.Extensions", Version = "0.2.0" },
{ Name = "Opal", Version = "1.0.2" },
]
4 changes: 2 additions & 2 deletions Samples/CSharp/BuildExtension/Executable/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name = "Samples.CSharp.BuildExtension.Executable"
Language = "C#"
Language = "C#|0.1"
Type = "Executable"
Version = "1.0.1"
Version = "1.0.0"
Source = [
"Program.cs"
]
Expand Down
8 changes: 4 additions & 4 deletions Samples/CSharp/BuildExtension/Extension/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Name = "Samples.CSharp.BuildExtension.Extension"
Language = "C#"
Language = "C#|0.1"
Version = "1.0.0"
Source = [
"CustomBuildTask.cs"
]

[Dependencies]
Runtime = [
{ Reference = "[email protected].3", ExcludeRuntime = true },
{ Reference = "Soup.Build.Extensions@0.1.8" },
{ Reference = "[email protected].1" },
{ Reference = "[email protected].4", ExcludeRuntime = true },
{ Reference = "Soup.Build.Extensions@0.2.0" },
{ Reference = "[email protected].3" },
]
2 changes: 1 addition & 1 deletion Samples/CSharp/ConsoleApplication/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.CSharp.ConsoleApplication"
Language = "C#"
Language = "C#|0.1"
Type = "Executable"
Version = "1.1.4"
Source = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.CSharp.ModuleDependency.ConsoleApplication"
Language = "C#"
Language = "C#|0.1"
Type = "Executable"
Version = "1.1.4"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Samples/CSharp/ModuleDependency/Module/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.CSharp.ModuleDependency.Module"
Language = "C#"
Language = "C#|0.1"
Type = "Module"
Version = "1.1.4"
Source = [
Expand Down
6 changes: 3 additions & 3 deletions Samples/Cpp/BuildExtension/Executable/PackageLock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
]
"C#" = [
{ Name = "Samples.Cpp.BuildExtension.Extension", Version = "C:/Users/mwasp/source/repos/Soup/Samples/Cpp/BuildExtension/Extension/" },
{ Name = "Soup.Build", Version = "[email protected].3" },
{ Name = "Soup.Build.Extensions", Version = "Soup.Build.Extensions@0.1.8" },
{ Name = "Opal", Version = "[email protected].1" },
{ Name = "Soup.Build", Version = "[email protected].4" },
{ Name = "Soup.Build.Extensions", Version = "Soup.Build.Extensions@0.2.0" },
{ Name = "Opal", Version = "[email protected].3" },
]
2 changes: 1 addition & 1 deletion Samples/Cpp/BuildExtension/Executable/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.SimpleBuildExtension.Executable"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.0.1"
Source = [
Expand Down
6 changes: 3 additions & 3 deletions Samples/Cpp/BuildExtension/Extension/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Name = "Samples.Cpp.BuildExtension.Extension"
Language = "C#"
Language = "C#|0.1"
Version = "1.0.0"
Source = [
"CustomBuildTask.cs"
]

[Dependencies]
Runtime = [
{ Reference = "[email protected].3", ExcludeRuntime = true },
{ Reference = "[email protected].4", ExcludeRuntime = true },
{ Reference = "[email protected]" },
{ Reference = "[email protected].1" },
{ Reference = "[email protected].3" },
]
2 changes: 1 addition & 1 deletion Samples/Cpp/ConsoleApplication/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.ConsoleApplication"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.1.3"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Samples/Cpp/DirectX/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.DirectX"
Language = "C++"
Language = "C++|0.1"
Type = "Windows"
Version = "1.0.0"
Partitions = [
Expand Down
2 changes: 1 addition & 1 deletion Samples/Cpp/DynamicLibrary/Application/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.DynamicLibrary.Application"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.0.0"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Samples/Cpp/DynamicLibrary/Library/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.DynamicLibrary.Library"
Language = "C++"
Language = "C++|0.1"
Version = "1.0.0"
Interface = "Module.cpp"
Type = "DynamicLibrary"
2 changes: 1 addition & 1 deletion Samples/Cpp/ModuleInterface/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.ModuleInterface"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.2.5"
Interface = "Module.cpp"
Expand Down
2 changes: 1 addition & 1 deletion Samples/Cpp/ParseJsonFile/PackageLock.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Projects]
"C++" = [
{ Name = "Samples.Cpp.ParseJsonFile", Version = "C:/Users/mwasp/source/repos/Soup/Samples/Cpp/ParseJsonFile" },
{ Name = "json11", Version = "[email protected].1" },
{ Name = "json11", Version = "[email protected].2" },
]
4 changes: 2 additions & 2 deletions Samples/Cpp/ParseJsonFile/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.ParseJsonFile"
Language = "C++"
Language = "C++|0.1"
Version = "1.0.0"
Type = "Executable"
Source = [
Expand All @@ -8,5 +8,5 @@ Source = [

[Dependencies]
Runtime = [
"[email protected].1",
"[email protected].2",
]
2 changes: 1 addition & 1 deletion Samples/Cpp/StaticLibrary/Application/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.StaticLibrary.Application"
Language = "C++"
Language = "C++|0.1"
Type = "Executable"
Version = "1.0.0"
Source = [
Expand Down
2 changes: 1 addition & 1 deletion Samples/Cpp/StaticLibrary/Library/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.StaticLibrary.Library"
Language = "C++"
Language = "C++|0.1"
Version = "1.0.0"
Interface = "Module.cpp"
Type = "StaticLibrary"
2 changes: 1 addition & 1 deletion Samples/Cpp/WindowsProject/Recipe.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name = "Samples.Cpp.WindowsApplication"
Language = "C++"
Language = "C++|0.1"
Type = "Windows"
Version = "1.1.3"
Resources = "WindowsProject.rc"
Expand Down
Loading

0 comments on commit 9966026

Please sign in to comment.