-
Notifications
You must be signed in to change notification settings - Fork 99
Update dotnet deps + run formatting on all relevant files + some fixes #1839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It looks like the build isn't working in CI for this PR
It builds fine on my Windows machine. 🤔
Seems GitHub actions builds on Ubuntu 22.04.
Can it (Linux) even target net472?
Why the Windows Server 2022 build fails I don't know.
...into updatedeps
It builds fine on my (Windows) machine as well, but I just pulled in your most recent changes and it's (still) not building on the server. We only build on windows, and then we use that build to test Windows PowerShell on Windows and PowerShell Core on Windows, Mac and Ubuntu.
Could you try opening up a new PR with a subset of these changes? It may help to have a smaller set of changes
Could we get more output on what/where it fails? dotnet.exe will create log files, right?
@adityapatwardhan's change resolved the build issue (just an incorrect file name), but it looks like many of the tests are failing with the same error:
Error parsing server metadata: Could not load file or assembly
| 'System.IO.Pipelines, Version=9.0.0.6, Culture=neutral,
| PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file
| specified.
...Shell--PSResourceGet into update-deps-250628
Maybe previous run results are deleted, but the one failed test I can see does not fail when testing manually from Windows PowerShell.
The name of the failed test was misleading though, find resource given CommandName, while it actually was finding module by module name. I updated the name.
Can this be rerun and can I get some logs to see where and what it fails on?
I think this PR will need to be broken down to smaller PRs to see what's causing this issue:
Find-PSResource: D:\a1円\s\test\FindPSResourceTests\FindPSResourceContainerRegistryServer.Tests.ps1:76
[-] Find all versions of resource when given specific Name, Version not null --> '' 486ms
Line |
Expected a value, but got $null or empty.
76 | ... $res = Find-PSResource -Name $testModuleName -Version "" -Repos ...
77: $res | Should -Not -BeNullOrEmpty
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at , D:\a1円\s\test\FindPSResourceTests\FindPSResourceContainerRegistryServer.Tests.ps1: line 77
| Error parsing server metadata: Could not load file or assembly 'System.IO.Pipelines, Version=9.0.0.8,
| Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Find-PSResource: D:\a1円\s\test\FindPSResourceTests\FindPSResourceContainerRegistryServer.Tests.ps1:87
It's very slow to troubleshoot when tests don't run on PR automatically. 🫠
I think it was due to upgrading System.Text.Json from v8 to v9, which requires dotnet 9.
Unfortunately now the package build is failing:
VERBOSE: Invoking build script
VERBOSE: Starting DoBuild for Microsoft.PowerShell.PSResourceGet with configuration: Release, framework: net472
VERBOSE: Module output file path: 'D:\a1円\s\out\Microsoft.PowerShell.PSResourceGet'
VERBOSE: Module build source path: 'D:\a1円\s\src\code\bin\Release\net472\publish'
VERBOSE: Building assembly and copying to 'D:\a1円\s\out\Microsoft.PowerShell.PSResourceGet'
VERBOSE: dotnet.exe command found in path: C:\hostedtoolcache\windows/dotnet\dotnet.exe
VERBOSE: DotNet version: 8.0.414
VERBOSE: Build location: PSScriptRoot: D:\a1円\s, PWD: D:\a1円\s\src\code
VERBOSE: Starting dotnet build command: dotnet.exe publish --configuration Release --framework net472 --output D:\a1円\s\src\code\bin\Release\net472\publish
VERBOSE: dotnet build failed with error: Build failed with exit code: 1
Invoke-ModuleBuild : Exception calling "Invoke" with "0" argument(s): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: dotnet build failed with error: Build failed with exit code: 1"
At D:\a1円\s\build.ps1:81 char:5
+ Invoke-ModuleBuild -BuildScript $sb
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-ModuleBuild], MethodInvocationException
+ FullyQualifiedErrorId : ActionPreferenceStopException,Invoke-ModuleBuild
##[error]PowerShell exited with code '1'.
Finishing: Build Module
It builds fine on my machine, using dotnet v8.0.414. Would be helpful with more verbose build logs.
If you don't want to continue with this PR just close it. Would be nice to have it working and merged, though.
Uh oh!
There was an error while loading. Please reload this page.
This PR is just a suggestion on some housekeeping I think is due.
Feel free to close it or ask for changes.
PR Summary
dotnet-outdated.alexr00.formatallfilesinworkspace.Install-PSResourceof PSResourceGet in setupReleaseTools, not the aliasInstall-Module./vs\) in build scripts.PR Context
Why?
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.