-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Covert to new SML Recipe language (#133)
* Switch to using try parse as default * convert language references to use reflex lexer * Convert to SML * Rename extensions and files * Update sample * Add Antlr Generator for SML C# * Add SML grammar * Convert over to using SML * Remove tomlyn * Add comments and bool literals * Add SML Recipes * Cleanup delimiters * Fix serialize * Update swhere path * Reference published version of reflex * Update opal * Convert to all SML recipes * Convert more over to updated packages Co-authored-by: Matthew Asplund <[email protected]>
- Loading branch information
Showing
168 changed files
with
25,952 additions
and
2,228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,7 @@ obj/ | |
|
||
# Wix | ||
msi/ | ||
wix/ | ||
wix/ | ||
|
||
# Antlr | ||
.antlr/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
# Recipe | ||
|
||
The Recipe file is the definition for a code package and will always be located at the root of the package directory structure. It is written in the [TOML](https://toml.io/en/) declarative language. (Note: TOML is not perfect and there is an open item to investigate other options). | ||
The Recipe file is the definition for a code package and will always be located at the root of the package directory structure. It is written in the SML (Simple Markup Language) declarative language. (Note: Adopted as a variation on TOML, still iterating on design). | ||
|
||
## Shared Properties | ||
|
||
### Name | ||
The **Name** property is required for all packages. It consists of a string value for the unique package name. Note: Unique here is within a build context. When local this is set of packages within a single language dependency graph. When published this is globally unique for a language. | ||
``` | ||
Name = "MyAwesomePackage" | ||
Name: "MyAwesomePackage" | ||
``` | ||
|
||
### Language | ||
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#|0.1" | ||
Language: "C#|0.1" | ||
``` | ||
|
||
### Version | ||
The **Version** property is required for all published packages. It consists of a string value that contains the semantic version of the package. | ||
``` | ||
Version = "1.0.0" | ||
Version: "1.0.0" | ||
``` | ||
|
||
### Dependencies | ||
The **Dependencies** property is a table of different dependency types that each consist of a list of dependency values. A dependency value can either be a string value with a [Package Reference](Package-Reference.md) or a table with a required **Reference** property that contains the Package Reference. The runtime will recursively build the dependencies and inject shared properties and allow read access for builds. | ||
``` | ||
[Dependencies] | ||
Runtime = [ | ||
"../MyOtherPackage/", | ||
"[email protected]", | ||
{ Reference = "[email protected]" }, | ||
] | ||
Dependencies: { | ||
Runtime: [ | ||
"../MyOtherPackage/", | ||
"[email protected]", | ||
{ Reference: "[email protected]" }, | ||
] | ||
} | ||
``` | ||
|
||
#### Build Dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,22 +3,23 @@ This is a console application that has a custom build extension that alters the | |
|
||
[Source](https://github.com/SoupBuild/Soup/tree/main/Samples/CSharp/BuildExtension) | ||
|
||
## Extension/Recipe.toml | ||
## Extension/Recipe.sml | ||
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#|0.1" | ||
Version = "1.0.0" | ||
Source = [ | ||
Name: "Samples.CSharp.BuildExtension.Extension" | ||
Language: "C#|0.1" | ||
Version: "1.0.0" | ||
Source: [ | ||
"CustomBuildTask.cs" | ||
] | ||
[Dependencies] | ||
Runtime = [ | ||
{ Reference = "[email protected]", ExcludeRuntime = true }, | ||
{ Reference = "[email protected]" }, | ||
{ Reference = "[email protected]" }, | ||
] | ||
Dependencies: { | ||
Runtime: [ | ||
{ Reference = "[email protected]", ExcludeRuntime = true }, | ||
{ Reference = "[email protected]" }, | ||
{ Reference = "[email protected]" }, | ||
] | ||
} | ||
``` | ||
|
||
## Extension/CustomBuildTask.cs | ||
|
@@ -78,21 +79,22 @@ namespace Samples.CSharp.BuildExtension.Extension | |
} | ||
``` | ||
|
||
## Executable/Recipe.toml | ||
## Executable/Recipe.sml | ||
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#|0.1" | ||
Type = "Executable" | ||
Version = "1.0.1" | ||
Source = [ | ||
Name: "Samples.CSharp.BuildExtension.Executable" | ||
Language: "C#|0.1" | ||
Type: "Executable" | ||
Version: "1.0.1" | ||
Source: [ | ||
"Program.cs" | ||
] | ||
[Dependencies] | ||
Build = [ | ||
"../Extension/" | ||
] | ||
Dependencies: { | ||
Build: [ | ||
"../Extension/" | ||
] | ||
} | ||
``` | ||
|
||
## Executable/Program.cs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,22 @@ A console application that reads in a json file using the an external module and | |
|
||
[Source](https://github.com/SoupBuild/Soup/tree/main/Samples/Cpp/ParseJsonFile) | ||
|
||
## Recipe.toml | ||
## Recipe.sml | ||
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++|0.1" | ||
Version = "1.0.0" | ||
Type = "Executable" | ||
Source = [ | ||
Name: "Samples.Cpp.ParseJsonFile" | ||
Language: "C++|0.1" | ||
Version: "1.0.0" | ||
Type: "Executable" | ||
Source: [ | ||
"Main.cpp", | ||
] | ||
[Dependencies] | ||
Runtime = [ | ||
"[email protected]", | ||
] | ||
Dependencies: { | ||
Runtime: [ | ||
"[email protected]", | ||
] | ||
} | ||
``` | ||
|
||
## Message.json | ||
|
Oops, something went wrong.