mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Introduce Microsoft.PowerShell.SDK
- introduce SDK project with our dependencies and CoreCLR framework for runtime. - Move dependencies for Full from ConsoleHost to powershell-win-full - make powershell-win-full Top-level project - Change build.psm1 to do publish for -FullCLR build - Update docs
This commit is contained in:
1 parent
52569380c7
commit
6626720e44
9 files changed
+201
-89
No files matched your search
+7
-13
@@ -180,7 +180,7 @@ function Start-PSBuild {
|
||||
|
||||
# setup arguments
|
||||
$Arguments = @()
|
||||
if ($Publish) {
|
||||
if ($Publish -or $FullCLR) {
|
||||
$Arguments += "publish"
|
||||
} else {
|
||||
$Arguments += "build"
|
||||
@@ -368,7 +368,7 @@ function New-PSOptions {
|
||||
}
|
||||
|
||||
if ($FullCLR) {
|
||||
$Top = "$PSScriptRoot/src/Microsoft.PowerShell.ConsoleHost"
|
||||
$Top = "$PSScriptRoot/src/powershell-win-full"
|
||||
} else {
|
||||
if ($Configuration -eq 'Linux')
|
||||
{
|
||||
@@ -415,15 +415,10 @@ function New-PSOptions {
|
||||
if ($Output) {
|
||||
$Output = Join-Path $PSScriptRoot $Output
|
||||
} else {
|
||||
$Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework)
|
||||
|
||||
# FullCLR only builds a library, so there is no runtime component
|
||||
if (-not $FullCLR) {
|
||||
$Output = [IO.Path]::Combine($Output, $Runtime)
|
||||
}
|
||||
$Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework, $Runtime)
|
||||
|
||||
# Publish injects the publish directory
|
||||
if ($Publish) {
|
||||
if ($Publish -or $FullCLR) {
|
||||
$Output = [IO.Path]::Combine($Output, "publish")
|
||||
}
|
||||
|
||||
@@ -770,11 +765,11 @@ function Publish-NuGetFeed
|
||||
'Microsoft.PowerShell.Commands.Management',
|
||||
'Microsoft.PowerShell.Commands.Utility',
|
||||
'Microsoft.PowerShell.ConsoleHost',
|
||||
'Microsoft.PowerShell.PSReadLine',
|
||||
'Microsoft.PowerShell.Security',
|
||||
'System.Management.Automation',
|
||||
'Microsoft.PowerShell.CoreCLR.AssemblyLoadContext',
|
||||
'Microsoft.PowerShell.CoreCLR.Eventing'
|
||||
'Microsoft.PowerShell.CoreCLR.Eventing',
|
||||
'Microsoft.PowerShell.SDK'
|
||||
) | % {
|
||||
if ($VersionSuffix)
|
||||
{
|
||||
@@ -1090,8 +1085,7 @@ function Start-TypeGen
|
||||
Push-Location "$PSScriptRoot/src/TypeCatalogParser"
|
||||
try
|
||||
{
|
||||
$topPath = if ($IsWindows) {'../powershell-windows'} else {'../powershell-unix'}
|
||||
dotnet run $topPath
|
||||
dotnet run ../powershell-sdk
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ We are calling `dotnet` tool build for `$Top` directory
|
||||
|
||||
- `src\powershell-windows` for CoreCLR on Windows.
|
||||
- `src\powershell-unix` for CoreCLR on Linux and OS X.
|
||||
- `src\Microsoft.PowerShell.ConsoleHost` for FullCLR builds (Windows only)
|
||||
- `src\powershell-full` for FullCLR builds (Windows only)
|
||||
|
||||
### Dummy dependencies
|
||||
|
||||
@@ -28,7 +28,7 @@ Dummy dependencies allows us to build just `$Top` folder, instead of building se
|
||||
### Dummy dependencies rules
|
||||
|
||||
* If assembly is part of FullCLR build,
|
||||
it should be listed as a dependency for FullCLR $Top folder (src\Microsoft.PowerShell.ConsoleHost)
|
||||
it should be listed as a dependency for FullCLR $Top folder (src\powershell-full)
|
||||
|
||||
* If assembly is part of CoreCLR build,
|
||||
it should be listed as a dependency for $Top folder (src\powershell-unix or src\powershell-windows)
|
||||
@@ -10,50 +10,7 @@
|
||||
"delaySign": true,
|
||||
"publicSign": false,
|
||||
"warningsAsErrors": true,
|
||||
"allowUnsafe": true,
|
||||
"copyToOutput": {
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Windows-Full",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
"../Modules/Shared/Pester/.git*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include" : [
|
||||
"powershell.exe",
|
||||
"powershell.pdb",
|
||||
"pwrshplugin.dll",
|
||||
"pwrshplugin.pdb",
|
||||
"../../powershell.version"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"publishOptions": {
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Windows-Full",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
"../Modules/Shared/Pester/.git*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include" : [
|
||||
"powershell.exe",
|
||||
"powershell.pdb",
|
||||
"pwrshplugin.dll",
|
||||
"pwrshplugin.pdb",
|
||||
"../../powershell.version"
|
||||
]
|
||||
"allowUnsafe": true
|
||||
},
|
||||
|
||||
"configurations": {
|
||||
@@ -94,25 +51,6 @@
|
||||
}
|
||||
},
|
||||
"net451": {
|
||||
"dependencies": {
|
||||
"Microsoft.Management.Infrastructure.CimCmdlets": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Core.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Diagnostics.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.GraphicalHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.LocalAccounts": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Management.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.ScheduledJob": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Security.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Utility.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Workflow.ServiceCore": "1.0.0-*",
|
||||
"Microsoft.WSMan.Management.Activities": "1.0.0-*"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
Microsoft PowerShell SDK
|
||||
========================
|
||||
|
||||
This project is a metapackage referencing the PowerShell projects and .NET Core packages that PowerShell ships.
|
||||
|
||||
The package dependencies consist of two parts:
|
||||
|
||||
1. PowerShell projects: local source code with own sets of dependencies
|
||||
2. .NET Core packages: the framework libraries that we ensure are present for PowerShell developers at runtime
|
||||
|
||||
This second set includes packages that we do not necessarily require at compile-time, but must provide for our users at runtime.
|
||||
For example, we include the library `System.Runtime.Serialization.Json.dll` so that users of PowerShell can utilize its types and methods,
|
||||
even though PowerShell does not directly depend on the library.
|
||||
|
||||
There are intentionally duplicated dependencies.
|
||||
Instead of relying on dependency transitivity where A -> B, B -> C, so A -> C,
|
||||
we explicitly include A -> C if A requires C despite the removal of B.
|
||||
Additionally, we want to easily identify our complete dependency set without generating a lockfile
|
||||
(an artifact of `dotnet restore` after it resolves the dependency graph).
|
||||
For example, `System.Management.Automation` depends on `System.Diagnostics.TraceSource`,
|
||||
but `Microsoft.PowerShell.SDK` depends on both `System.Diagnostics.TraceSource` and `System.Management.Automation`.
|
||||
|
||||
Transitive dependencies not listed in [project.json][] are **not a part of public contract**.
|
||||
|
||||
[project.json]: project.json
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"name": "Microsoft.PowerShell.SDK",
|
||||
"version": "1.0.0-*",
|
||||
"description": "PowerShell SDK metapackage",
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.Commands.Management" : "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility" : "1.0.0-*",
|
||||
"Microsoft.PowerShell.ConsoleHost" : "1.0.0-*",
|
||||
"Microsoft.PowerShell.Security" : "1.0.0-*",
|
||||
"System.Management.Automation" : "1.0.0-*"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"netstandard1.6": {
|
||||
"imports": ["dnxcore50", "portable-net45+win8"],
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
|
||||
"Microsoft.CSharp": "4.0.1",
|
||||
"Microsoft.VisualBasic": "10.0.1",
|
||||
"Microsoft.Win32.Registry" : "4.0.0",
|
||||
"Microsoft.Win32.Registry.AccessControl" : "4.0.0",
|
||||
"NETStandard.Library": "1.6",
|
||||
"System.Collections.Immutable" : "1.2.0",
|
||||
"System.Collections.NonGeneric" : "4.0.1",
|
||||
"System.Collections.Specialized" : "4.0.1",
|
||||
"System.ComponentModel" : "4.0.1",
|
||||
"System.ComponentModel.Annotations" : "4.1.0",
|
||||
"System.ComponentModel.EventBasedAsync" : "4.0.11",
|
||||
"System.ComponentModel.Primitives" : "4.1.0",
|
||||
"System.ComponentModel.TypeConverter" : "4.1.0",
|
||||
"System.Data.Common" : "4.1.0",
|
||||
"System.Data.SqlClient" : "4.1.0",
|
||||
"System.Diagnostics.Contracts" : "4.0.1",
|
||||
"System.Diagnostics.DiagnosticSource" : "4.0.0",
|
||||
"System.Diagnostics.FileVersionInfo" : "4.0.0",
|
||||
"System.Diagnostics.Process" : "4.1.0",
|
||||
"System.Diagnostics.StackTrace" : "4.0.1",
|
||||
"System.Diagnostics.TextWriterTraceListener" : "4.0.0",
|
||||
"System.Diagnostics.TraceSource" : "4.0.0",
|
||||
"System.Dynamic.Runtime" : "4.0.11",
|
||||
"System.Globalization.Extensions" : "4.0.1",
|
||||
"System.IO.FileSystem.AccessControl" : "4.0.0",
|
||||
"System.IO.FileSystem.DriveInfo" : "4.0.0",
|
||||
"System.IO.FileSystem.Watcher" : "4.0.0",
|
||||
"System.IO.MemoryMappedFiles" : "4.0.0",
|
||||
"System.IO.Packaging" : "4.0.0",
|
||||
"System.IO.Pipes" : "4.0.0",
|
||||
"System.IO.UnmanagedMemoryStream" : "4.0.1",
|
||||
"System.Linq.Parallel" : "4.0.1",
|
||||
"System.Linq.Queryable" : "4.0.1",
|
||||
"System.Net.Http.WinHttpHandler" : "4.0.0",
|
||||
"System.Net.NameResolution" : "4.0.0",
|
||||
"System.Net.NetworkInformation" : "4.1.0",
|
||||
"System.Net.Ping" : "4.0.0",
|
||||
"System.Net.Requests" : "4.0.11",
|
||||
"System.Net.Security" : "4.0.0",
|
||||
"System.Net.WebHeaderCollection" : "4.0.1",
|
||||
"System.Net.WebSockets" : "4.0.0",
|
||||
"System.Net.WebSockets.Client" : "4.0.0",
|
||||
"System.Numerics.Vectors" : "4.1.1",
|
||||
"System.Reflection.DispatchProxy" : "4.0.1",
|
||||
"System.Reflection.Emit" : "4.0.1",
|
||||
"System.Reflection.Emit.ILGeneration" : "4.0.1",
|
||||
"System.Reflection.Emit.Lightweight" : "4.0.1",
|
||||
"System.Reflection.Metadata" : "1.3.0",
|
||||
"System.Reflection.TypeExtensions" : "4.1.0",
|
||||
"System.Resources.Reader" : "4.0.0",
|
||||
"System.Runtime.CompilerServices.VisualC" : "4.0.0",
|
||||
"System.Runtime.Serialization.Json" : "4.0.2",
|
||||
"System.Runtime.Serialization.Primitives" : "4.1.1",
|
||||
"System.Runtime.Serialization.Xml" : "4.1.1",
|
||||
"System.Security.AccessControl" : "4.0.0",
|
||||
"System.Security.Claims" : "4.0.1",
|
||||
"System.Security.Cryptography.Cng" : "4.2.0",
|
||||
"System.Security.Cryptography.Csp" : "4.0.0",
|
||||
"System.Security.Cryptography.Pkcs" : "4.0.0",
|
||||
"System.Security.Principal" : "4.0.1",
|
||||
"System.Security.Principal.Windows" : "4.0.0",
|
||||
"System.Security.SecureString" : "4.0.0",
|
||||
"System.ServiceModel.Duplex" : "4.0.1",
|
||||
"System.ServiceModel.Http" : "4.1.0",
|
||||
"System.ServiceModel.NetTcp" : "4.1.0",
|
||||
"System.ServiceModel.Primitives" : "4.1.0",
|
||||
"System.ServiceModel.Security" : "4.0.1",
|
||||
"System.ServiceProcess.ServiceController" : "4.1.0",
|
||||
"System.Text.Encoding.CodePages" : "4.0.1",
|
||||
"System.Text.Encodings.Web" : "4.0.0",
|
||||
"System.Threading.AccessControl" : "4.0.0",
|
||||
"System.Threading.Overlapped" : "4.0.1",
|
||||
"System.Threading.Tasks.Dataflow" : "4.6.0",
|
||||
"System.Threading.Tasks.Parallel" : "4.0.1",
|
||||
"System.Threading.Thread" : "4.0.0",
|
||||
"System.Threading.ThreadPool" : "4.0.10",
|
||||
"System.Xml.XmlDocument" : "4.0.1",
|
||||
"System.Xml.XmlSerializer" : "4.0.11",
|
||||
"System.Xml.XPath" : "4.0.1",
|
||||
"System.Xml.XPath.XDocument" : "4.0.1",
|
||||
"System.Xml.XPath.XmlDocument" : "4.0.1",
|
||||
"System.Private.ServiceModel": "4.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,9 +15,7 @@ namespace TypeCatalogParser
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
"Usage: ./TypeCatalogParser <path-to-top-level-powershell-project>\n" +
|
||||
"Valid options are '../powershell-unix' and '../powershell-windows'");
|
||||
throw new ArgumentException("Usage: ./TypeCatalogParser ../powershell-sdk");
|
||||
}
|
||||
|
||||
// These are packages that are not part of .NET Core and must be excluded
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "powershell",
|
||||
"version": "1.0.0-*",
|
||||
"description": ".NET CLI PowerShell app",
|
||||
"description": "PowerShell top-level project with .NET CLI host",
|
||||
|
||||
"buildOptions": {
|
||||
"xmlDoc": true,
|
||||
@@ -51,10 +51,8 @@
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.ConsoleHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.SDK": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*"
|
||||
},
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "powershell",
|
||||
"version": "1.0.0-*",
|
||||
"description": "PowerShell top-level project for FullCLR package with native host",
|
||||
|
||||
"publishOptions": {
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Windows-Full",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
"../Modules/Shared/Pester/.git*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include" : [
|
||||
"powershell.exe",
|
||||
"powershell.pdb",
|
||||
"pwrshplugin.dll",
|
||||
"pwrshplugin.pdb",
|
||||
"../../powershell.version"
|
||||
]
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.SDK": "1.0.0-*",
|
||||
"Microsoft.Management.Infrastructure.CimCmdlets": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Core.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Diagnostics.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.GraphicalHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.LocalAccounts": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Management.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.ScheduledJob": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Security.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Utility.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Workflow.ServiceCore": "1.0.0-*",
|
||||
"Microsoft.WSMan.Management.Activities": "1.0.0-*"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"net451": {}
|
||||
},
|
||||
|
||||
"runtimes": {
|
||||
"win7-x64": { },
|
||||
"win81-x64": { },
|
||||
"win10-x64": { },
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "powershell",
|
||||
"version": "1.0.0-*",
|
||||
"description": ".NET CLI PowerShell app",
|
||||
"description": "PowerShell top-level project with .NET CLI PowerShell app",
|
||||
|
||||
"buildOptions": {
|
||||
"xmlDoc": true,
|
||||
@@ -51,11 +51,9 @@
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.ConsoleHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.SDK": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.LocalAccounts": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*",
|
||||
"Microsoft.Management.Infrastructure.CimCmdlets": "1.0.0-*"
|
||||
|
||||
Reference in new issue
Block a user