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

Scripts parsing global.json throws if it don't have required properties #1557

Open
Tracked by #1002
natemcmaster opened this issue Dec 12, 2018 · 1 comment
Open
Tracked by #1002
Assignees
Milestone

Comments

@natemcmaster
Copy link
Contributor

eng/common/tools.ps1 throws if required options are not set in global.json. The powershell error thrown does not make it clear what is the expected syntax for global.json.

For instance, if 'tools' isn't present:

2018-12-12T03:00:31.9251470Z The property 'tools' cannot be found on this object. Verify that the property exists.
2018-12-12T03:00:31.9273638Z System.Management.Automation.PropertyNotFoundException: The property 'tools' cannot be found on this object. Verify that the property exists.
2018-12-12T03:00:31.9274457Z    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2018-12-12T03:00:31.9274686Z    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2018-12-12T03:00:31.9274985Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2018-12-12T03:00:31.9275266Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2018-12-12T03:00:31.9292453Z at InitializeBuildTool, F:\vsagent\-containerSas\76\s\eng\common\tools.ps1: line 310
2018-12-12T03:00:31.9292784Z at InitializeToolset, F:\vsagent\-containerSas\76\s\eng\common\tools.ps1: line 388
2018-12-12T03:00:31.9293008Z at Build, F:\vsagent\-containerSas\76\s\eng\common\Build.ps1: line 78
2018-12-12T03:00:31.9293169Z at <ScriptBlock>, F:\vsagent\-containerSas\76\s\eng\common\Build.ps1: line 125
2018-12-12T03:00:31.9293600Z at <ScriptBlock>, <No file>: line 1

Or if msbuild-sdks is missing the Arcade entry:

2018-12-12T00:53:55.1340100Z The property 'Microsoft.DotNet.Arcade.Sdk' cannot be found on this object. Verify that the property exists.
2018-12-12T00:53:55.1363846Z System.Management.Automation.PropertyNotFoundException: The property 'Microsoft.DotNet.Arcade.Sdk' cannot be found on this object. Verify that the property exists.
2018-12-12T00:53:55.1364401Z    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2018-12-12T00:53:55.1364650Z    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2018-12-12T00:53:55.1365035Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2018-12-12T00:53:55.1365296Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2018-12-12T00:53:55.1382179Z at InitializeToolset, F:\vsagent\-containerSas\70\s\eng\common\tools.ps1: line 373
2018-12-12T00:53:55.1382681Z at Build, F:\vsagent\-containerSas\70\s\eng\common\Build.ps1: line 78
2018-12-12T00:53:55.1382915Z at <ScriptBlock>, F:\vsagent\-containerSas\70\s\eng\common\Build.ps1: line 125
2018-12-12T00:53:55.1383308Z at <ScriptBlock>, <No file>: line 1

Context: we're trying to implement darc dependency flow by only using part of Arcade. It doesn't appear we actually need some of these entries in global.json

@markwilkie
Copy link
Member

@mmitche / @jcagme - It seems we might should clean up the property interdependency with the dependency flow stuff.

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

No branches or pull requests

4 participants