Commit graph

6384 commits

Author SHA1 Message Date
Aditya Patwardhan 087305334b
Update docs and metadata JSON (#7597) 2018-08-22 08:32:39 -07:00
Travis Plunk dfa159898a
Add rc.1 Changelog (#7594) 2018-08-21 17:24:14 -07:00
Travis Plunk 9947985b87
Don't upload artifacts during pull request due to missing VSTS feature (#7588) 2018-08-21 16:55:18 -07:00
Travis Plunk 849f6fb147
Add test for scriptblock logging for macOS (#7586) 2018-08-21 13:20:54 -07:00
Aditya Patwardhan cbbc8192c4 Merged PR 4656: Add back the powershell-core source for hosting tests 2018-08-21 17:24:06 +00:00
Aditya Patwardhan abb8f6bc80 Merged PR 4645: Fix SDK dependencies
Removed old dependencies from SMA and fixed the netcoreapp version.
2018-08-20 23:47:40 +00:00
Travis Plunk 40532d9a2e
Add VSTS CI for Windows (#7536)
- Add VSTS CI for Windows
    - Disable `Access-denied test for Get-Item C:\windows\appcompat\Programs\Install -ErrorAction Stop`, because the path does not always exist
        - https://github.com/PowerShell/PowerShell/issues/7553
    - Disable `Should give .sys file if the fullpath is specified with hidden and force parameter`, because pagefile.sys doesn't always exist and other files don't meet test's requirement.
        - https://github.com/PowerShell/PowerShell/issues/7554
    - Disable some `Test-Connection` tests for same reasons they failed on VSTS Linux
        - https://github.com/PowerShell/PowerShell/issues/7555
    - Disable `Test-FileCatalog should pass when catalog is in the same folder as files being tested`, because the CmdLet does not work in that scenario
         - Also, give details needed to investigate when the test fails
         - https://github.com/PowerShell/PowerShell/issues/7556
    - Update `appveyor.psm1` to work with VSTS
    - Update `HelpersRemoting.psm1` `New-RemoteSession` to work for CimSession (discovered an issue during the investigation)
    - Update `Test wildcard with drive relative directory path` to work when there are multiple drives
         - Disable on non-windows machines since the test is assuming drive letters
    - Update `New-CimSession` Tests to requireAdmin
         - Also, make sure session name is a string
    - Add functions to save and restore psoptions
    - update `.gitatttributes` so files clone like they do on appveyor
2018-08-17 22:06:51 -07:00
Aditya Patwardhan 9fa97adeba Update PSGet version (#7564) 2018-08-17 15:50:38 -07:00
Aditya Patwardhan c42bda879b Update PSGet version 2018-08-17 15:09:26 -07:00
Travis Plunk bfd46b1a3f
make sure we continue with retry loop when we get an error (#7550)
Improve logging
2018-08-16 17:24:41 -07:00
Aditya Patwardhan 4866b5f326 Fix typo on environment checker for RedHat (#7549) 2018-08-16 16:44:20 -07:00
Aditya Patwardhan 5232bb4890 Fix typo in environment checker (#7547)
Fix error in environment checking logic for RedHat family.
2018-08-16 16:18:34 -07:00
Aditya Patwardhan 96b2c83c59 Update reference to use packages from NuGet.org (#7525)
Update psrp and libpsl reference to Microsoft.PowerShell.Native
Keep the reference to powershell.myget.org in nuget.config for PSDesiredStateConfiguration and PowerShellHelpFiles
Update hosting tests
Update hosting.tests.csproj in preparation on next release with version 6.1.0-rc.1
Update Microsoft.Management.Infrastructure to version 1.0.0
2018-08-16 15:56:15 -07:00
Travis Plunk a746fd29ec
Revert "Throw error on entering non-existing type in Get-FormatData (#7434)" (#7546)
Revert "Throw error on entering non-existing type in Get-FormatData (#7434)
This reverts commit b754cd80d5.

Per this comment https://github.com/PowerShell/PowerShell/pull/7434#issuecomment-413696259
2018-08-16 15:46:12 -07:00
Travis Plunk 01634e4b2e Retry restore on failure (#7544)
* switch to using a retry
2018-08-16 14:23:30 -07:00
Travis Plunk 0a1a47e8b0
Make sure we do not upload artifacts during a pull request (#7535) 2018-08-16 13:11:24 -07:00
Travis Plunk 4acf1038a1
Only remove the revision if it is 0 from module version when restoring modules (#7538) 2018-08-15 21:53:00 -07:00
Dongbo Wang 79234ca91a Update version of modules shipped with PowerShell (#7531) 2018-08-15 15:25:08 -07:00
Travis Plunk a0c6915eb5
Remove module version directories (#7523)
I missed this in reviewing #7518
2018-08-14 18:10:21 -07:00
Paul Higinbotham a21366710c Updated thread job to version 1.1.2 (#7522)
Added fix to remove unneeded validation attribute for Arguments parameter, and made tests work with strict mode.
2018-08-14 17:09:48 -07:00
Travis Plunk 965552873c
Add Linux VSTS CI (#7527)
Update Start-PSPester and Start-PSxUnit to upload test results when running in VSTS
Disable tests which require non-root using when running as root
remove verifications in Test-Connection tests which verify buggy behavior
Skip tests which don't behave correctly in VSTS (due to running in a container?)
- Test-Connection - #7528
- Set-Date - #7529
2018-08-14 16:23:50 -07:00
Aditya Patwardhan f19c5dae1f Update NuGet package metadata (#7517) 2018-08-14 13:31:58 -07:00
Aditya Patwardhan ee33db0798 Fix building on RedHat Enterprise Linux (#7489)
When trying to build on RHEL, the environment is not recognized as RedHatFamily.
Added detection logic so that appropriate symbolic links are generated.
2018-08-14 13:21:26 -07:00
kwkam 820286e117 Build: Also search PATH for rcedit (#7503) 2018-08-14 10:17:29 -07:00
Steve Lee 769b02ab98 Save modules to un-versioned folder to enable servicing (#7518)
Remove code from build.psm1 that save the modules to a versioned folder. For servicing reasons after release it is preferred and easier to not have the versioned folder so that we can directly replace modules that need to be serviced (MSI specifically makes it difficult to service a module if the folder path changes).
2018-08-14 10:15:05 -07:00
Ilya 4ee1973d97 Fix some style issues in engine code (#7246)
The PR resolves some style issues in engine code. (Moved from PR #7242. )
2018-08-13 17:03:27 -07:00
Travis Plunk b5acb298a4
workaround xunit test crash on VSTS (#7516) 2018-08-13 16:18:49 -07:00
Travis Plunk b06b0ca6e5
Allow publishing artifacts or test results to fail but to fail the run (#7515) 2018-08-13 15:44:33 -07:00
Aditya Patwardhan b149e55e47
Update README and metadata.json for release v6.0.4 (#7497) 2018-08-10 15:40:13 -07:00
Travis Plunk b3d0913d74
Add CI definition for VSTS for macOS (#7490)
Add CI definition for VSTS for macOS
  - Add VSTS YAML for mac
  - Add a function to upload log files during a test on VSTS
2018-08-10 15:13:31 -07:00
Staffan Gustafsson 1243891ea8 Improve performance on json to psobject conversion (#7482)
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.
2018-08-10 10:28:15 -07:00
Staffan Gustafsson 3aaa1816d1 Adding 'LanguagePrimitives.TryCompare' to provide faster comparisons (#7438) 2018-08-10 10:20:27 -07:00
Brandon Olin 8374a5c97d Remove one unneeded verbose output from 'ConvertTo-Json' (#7487) 2018-08-10 10:13:05 -07:00
Syed Faraaz Ahmad b754cd80d5 Throw error on entering non-existing type in Get-FormatData (#7434)
Write non-terminating error when `Get-FormatData` doesn't found a type definition for the provided type,
2018-08-10 09:34:02 +05:00
Staffan Gustafsson 037e12eddc Improve the performance of 'Group-Object' (#7410) 2018-08-09 12:11:06 -07:00
Staffan Gustafsson 618d9f31a0 Add '-SkipIndex' parameter to 'Select-Object' (#7483) 2018-08-09 11:59:54 -07:00
Dongbo Wang 791159d615
Add 'Former Repository Maintainers' section in maintainers/README.md (#7475) 2018-08-08 12:38:45 -07:00
Dongbo Wang ca64bfb3e3
Update the 'HelpUri' for 'Get-ExperimentalFeature' (#7466) 2018-08-08 12:38:07 -07:00
Travis Plunk d29349bb4d
Default to DefaultConsoleWidth when DotNet says WindowWidth is 0 (#7465)
Default to DefaultConsoleWidth when DotNet says WindowWidth is 0

This resolves an issue in an environment like VSTS when pwsh is spawned and DotNet is not able to determine the Console Width.
* Port changes from #6883 by @kalgiz
2018-08-07 15:27:42 -07:00
Travis Plunk 1523c218a6
Make sure that SettingFile arg is parsed before we load the settings (#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)
2018-08-07 15:01:31 -07:00
Bruce Payette 0c11582e6c Make Native globbing on UNIX return an absolute path when it is given an absolute path (#7106)
Fix #7089. Native globbing on UNIX was turning absolute paths into relative paths when it shouldn't. The code suppresses generating a relative path for paths starting with '~'. It also need to do the same for paths starting with '/'.
2018-08-07 14:38:22 -07:00
Aditya Patwardhan f858e6d207 Add Microsoft.PowerShell.MarkdownRender to signing xml (#7472) 2018-08-07 11:47:36 -07:00
Steve Lee 36dc96af0e Fix error message for Add-Type when -AssemblyName with wildcard is not found (#7444) 2018-08-06 11:12:39 -07:00
Ilya 097e14426f Avoid extra unnecessary allocations in PSMemberInfoInternalCollection<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.
2018-08-06 11:06:37 -07:00
Staffan Gustafsson d620c4fd1e Improve performance of Import-CSV up to 10 times (#7413)
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).
2018-08-06 10:58:55 -07:00
Greg Zimmerman f0ea0d380f Add preview icon to macOS launcher (#7448) 2018-08-05 11:00:39 -07:00
kwkam fbfbb4f005 [Feature] Fix Move-Item -Path with wildcard char (#7397)
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.
2018-08-05 17:31:06 +05:00
Robert Holt dbdcf6e5eb Fix to not duplicate the System32 module path when starting pwsh from pwsh (#7414) 2018-08-03 11:22:30 -07:00
Dongbo Wang 25c127c3bc
Update CI scripts to support running tests for experimental features (#7419) 2018-08-03 11:20:14 -07:00
Aditya Patwardhan ac8ac4f25b Update NuGet packaging code for the new markdown assembly (#7431) 2018-08-02 23:00:54 -07:00