Catch up to PowerShell/PowerShell/master#1
Merged
vexx32 merged 64 commits intovexx32:masterfrom Aug 12, 2018
Merged
Conversation
…'System32' module path (#7183) - Add `%WINDIR%\System32\WindowsPowerShell\v1.0\Modules` (Windows PowerShell $PSHOME) to the end of the default PSCore 6 module path (i.e. the module path as initially set at startup). - Cause an error to be thrown by `Import-Module` when a module with `CompatiblePSEditions` not containing `"Core"` is being loaded from the 'System32' module path. - Suppress output of modules listed by `Get-Module -ListAvailable` from Windows PowerShell $PSHOME when `CompatiblePSEditions` does not contain `"Core"`. - Introduce the `-SkipCompatibilityCheck` switch parameter on both `Import-Module` and `Get-Module` to respectively allow importing incompatible modules and listing incompatible modules. - Adds a `PSEdition` column to the `PSModuleInfo` table view format. - Ensures that completions are not given for incompatible modules on the System32 module path.
…#7202) The intent was to have the version of the PSSessionConfiguration name not include the `v` for the version string. Also, Preview releases should standardize on `PowerShell.6-Preview` instead of clobbering `PowerShell.6` so that stable and preview can co-exist side-by-side. Need to verify on Win10 IoT if `Install-PowerShellRemoting.ps1` is still needed anymore as it may be possible to run `pwsh -c enable-psremoting` from within Windows PowerShell Core removing the need for that script which duplicates `Enable-PSRemoting` capability. Update: Not able to get the current master build working on Win10 IoT, getting `Invalid access to memory` error. Will have to investigate this separately from this PR and keep `Install-PowerShellRemoting.ps1` for now. Fix #7119
initial draft of changelog
Related #4708. Format Microsoft.PowerShell.Commands.Utility.csproj by codeformatter with default options. The codeformatter is used that I compiled with newest Roslyn packages (version 2.8.2).
* update docker read me to point to new repo * remove unused files
Fix is to change the regex to allow for variable or no whitespace and associated tests to handle these two cases.
Some values are not converted from json to PSCustomObject, because Newtonsoft.Json reads them and thinks they are metadata properties only useful for deserialization. This change makes Newtonsoft.Json "ignore" those properties so they are converted correctly from json to PSCustomObject.
…tatements (#7305) - Make switch-statement report correct error position when it fails to evaluate the condition. - Make for-statement report correct error position when it fails to evaluate the initializer. - For the condition of `if/for/while/do-while/do-until` statements, the sequence point update is either duplicate in some cases (for `if/for/while`) which causes debugger to stop at the condition twice before moving forward, or missing (for `do-while/do-until`) which causes debugger to skip the condition. They are fixed.
…with .NET methods (#7129)
enable `pwsh-preview` to work on Windows
…no longer supported in .NET Core (#7344) A comment from the existing `Utils.IsComObject` mentions that: "We can't use System.Runtime.InteropServices.Marshal.IsComObject(obj) since it doesn't work in partial trust." Partial trust is a concept of Code Access Security (CAS)/Security-Transparent. CAS and Security-Transparent are no longer supported in .NET Core, so we should use `Marshal.IsComObject` instead.
… unable to determine (#7355)
…owerShell work when starting from PSCore (#7365)
…` more properly (#7300) - Allow specifying the configuration, rather than the `bin` folder. - Do not attempt to pass null/empty `ArgumentList` to `Start-Process`.
- Formatting file should be used for `MarkdownOptionInfo` object instead of the types file for adding script property. - Downlevel windows consoles which do not support VT100 escape sequences should be handled gracefully. - Add helpuri fwlink for cmdlets. - Make `-Path` a positional parameter for `ConvertFrom-Markdown` - make `-InputObject` a positional parameter for `Set-MarkdownOption`
* Set the cursor to the place where a user hits tab key
…isualStudio (#7254) * add csproj ref to sln * Remove Microsoft.NET.Test.Sdk NuGet reference. The xunit.runner.visualstudio package is now sufficient for running tests in VS in the latest version (15.7.5) * use RTM versions of XUnit 2.4.0 that got published today * Update XUnit in hosting project as well to newer release
#7354) * add support for -Path/-LiteralPath and piping strings directly to Show-Markdown * update tests to set vt100 support
Before the fix the TryConvertTo() is implemented in terms of Convert(), but with wrapping exception handling. This is costly performance wise. By inlining the implementation of ConvertTo(), and getting access to the FigureConversion output we can determine upfront on at least some occations that a conversion is not available.
Unescape non-literal, non-glob path in ProccessRecord and set the context.SuppressWildcardExpansion in RenameItem. This solve the issue where Rename-Item complains -Path does not exist when both -Path and CWD contains special characters.
Speed up the creation of PSObjects in CSV cmdlets by - Use the overload Add(PSMember, bool prevalidated) for all objects except the first when adding the `NoteProperty` members. - Add a new constructor to PSObject that preallocates the `_instanceMembers` collection with an initial capacity. - Improve performance of AddToTypesXmlCache by avoiding an expensive copying of members just to check for the existence of one of them, perf is significantly increased, and allocations are reduced. - Reduce allocations and GC pressure by preallocating and reusing `StringBuilders` and `List<string>` for line parsing in CSV cmdlets. - Use `List<string>` instead of `Collection<string>` to get fewer virtual calls and better inlining. - Reduce allocations by using a preallocated value factory in `TypeTable.GetMembers(ConsolidatedString types)`. - Replace a `Linq.Any()` with a `List.Count > 0` in binder code. The main gain is from taking advantage of the fact that all objects created by `Import-Csv` have the same shape (the same properties).
…<T> (#7435) `PSMemberInfoInternalCollection<T>` uses OrderedDictionary class internally. `OrderedDictionary` in dotnet core 2.1 allocates `ArrayList` and `Hashtable` after any first using any property. Even if the `OrderedDictionary` object is actually empty. The commit postpones the internal allocations until it's really necessary. Given that `PSMemberInfoInternalCollection<T>` is used in each PSObject and is often empty, this change dramatically reduces memory allocations.
…7449) Make sure that SettingFile arg is parsed before we load the settings - Add ability to parse some setting before console host is created - Trigger the Parse before the console host is created - disable snapin loading from loading setting before this point - re-enable mac logging tests. Also, fix the following Travis-ci issues: - make sure the Linux and macOS caches are separate to reduce the size - update the macOS image to the closest image as used by the official build system (equivalent to VSTS hosted mac builds)
Write non-terminating error when `Get-FormatData` doesn't found a type definition for the provided type,
This amounts so a speed-up in the order of 7x. Cmdlets that benefit from this are `Convertfrom-Json` and `Invoke-RestMethod`. There are three main changes: - Convert from `JArray` directly to object array instead of creating a `List` and do `list.ToArray()`. - Avoid iterating through `PSObject.Properties` to check for existing members, since that is a very slow and allocation heavy code path. - Pre-allocate the members in `PSObject` by using the newly added constructor accepting an initial member count.
Add CI definition for VSTS for macOS - Add VSTS YAML for mac - Add a function to upload log files during a test on VSTS
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests