-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update packaging to only package PowerShell binaries when packaging symbols #5145
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
Update packaging to only package PowerShell binaries when packaging symbols #5145
Conversation
…ting symbols zip. disallow all other package types for symbols
|
https://github.com/PowerShell/PowerShell/pull/5145/files?w=1 make this a lot easier to review. |
| elseif(-not $IncludeSymbols.IsPresent -and $Script:Options.CrossGen) { | ||
| $crossGenCorrect = $true | ||
| } | ||
| elseif ($IncludeSymbols.IsPresent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now it's OK to specify -IncludeSymbols while build with -Crossgen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the non-publish builds always keep the symbols, unaltered.
tools/packaging/packaging.psm1
Outdated
| log 'setting IncludeSymbols' | ||
| $IncludeSymbols = $PSBoundParameters['IncludeSymbols'] | ||
| } | ||
| log "$($IncludeSymbols.IsPresent):$IncludeSymbols" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When -IncludeSymbols is not specified, this log will print just a colon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove... this was troubleshooting...
| { | ||
| $tempPath = [System.IO.Path]::GetTempPath() | ||
|
|
||
| $tempFolder = Join-Path -Path $tempPath -ChildPath ([System.IO.Path]::GetRandomFileName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about replace these 2 lines with [System.IO.Path]::GetTempFileName()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API creates the file. I want a folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but you can use that name to create a folder. The two lines of script shown here are doing the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have to delete the file before I can create a folder with the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point. Yeah, please ignore this comment.
adityapatwardhan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With minor comment
tools/packaging/packaging.psm1
Outdated
| } | ||
| if($IncludeSymbols.IsPresent) | ||
| { | ||
| Remove-Item -Path $Source -Recurse -Force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe -ErrorAction SilentlyContinue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
|
@daxian-dbw can you update your review? |
daxian-dbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with 2 comments.
| { | ||
| $tempPath = [System.IO.Path]::GetTempPath() | ||
|
|
||
| $tempFolder = Join-Path -Path $tempPath -ChildPath ([System.IO.Path]::GetRandomFileName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but you can use that name to create a folder. The two lines of script shown here are doing the same thing.
| } | ||
| if($IncludeSymbols.IsPresent) | ||
| { | ||
| Remove-Item -Path $Source -Recurse -Force -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if you can put a comment here saying that "$Source is point to a temporary folder when -IncludeSymbols is present".
daxian-dbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
disallow all other package types for symbols, as this package is no longer intended to be installed.
I run compliance tools on all binaries in this packages and we are getting more issues from the dependencies than from our product binaries.