Skip to content
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

Log build info #772

Merged
merged 5 commits into from
Oct 29, 2018
Merged

Log build info #772

merged 5 commits into from
Oct 29, 2018

Conversation

rjmholt
Copy link
Contributor

@rjmholt rjmholt commented Oct 12, 2018

Partially helps PowerShell/vscode-powershell#1393.

This logs the information about where the extension was build in the log file at startup.

I also cleaned up the startup logging a little bit.

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! LGTM

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just couple questions

$buildVersion = $env:APPVEYOR_BUILD_VERSION
$buildOrigin = if ($env:CI) { "AppVeyor CI" } else { "AppVeyor" }
}
elseif ($env:VSTS_BUILD)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last I checked the VSTS environment variable that's set is TF_BUILD. Do they also set VSTS_BUILD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We define VSTS_BUILD.

But I just saw that TF_BUILD is defined as well. So probably a good opportunity to remove VSTS_BUILD.

{
$psd1Path = [System.IO.Path]::Combine($PSScriptRoot, "module", "PowerShellEditorServices", "PowerShellEditorServices.psd1")
$buildVersion = (Import-PowerShellDataFile -LiteralPath $psd1Path).Version
$buildOrigin = "VSTS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehhem "Azure Pipelines" 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but felt we should keep things consistent and change it over all at once.

@@ -20,6 +20,8 @@
<PackageReference Include="Microsoft.PowerShell.SDK">
<Version>6.0.0-alpha13</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Extensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we are shipping this, I think there were a couple instances where we did some ifdefs between Core and Framework (which didn't have this package). If it's easy, can you remove the ifdefs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't forget to register the open source usage.

@@ -20,8 +20,6 @@
<PackageReference Include="Microsoft.PowerShell.SDK">
<Version>6.0.0-alpha13</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Extensions" Version="4.3.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come you removed this? Is it because PowerShellEditorServices project uses it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm, this might have been my "rip out redundant dependencies" reflex kicking in from the v2 refactor. Perhaps I should put it back in here?

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 just a single question

@rjmholt rjmholt merged commit 954e4db into PowerShell:master Oct 29, 2018
@rjmholt rjmholt deleted the log-build-info branch December 12, 2018 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants