-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use Python Version: let user select architecture as an advanced option #6937
Changes from all commits
fd722ca
8d4a7b9
34092dd
2642272
da86097
6a2ad3b
020e836
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,19 @@ | |
"author": "Microsoft Corporation", | ||
"version": { | ||
"Major": 0, | ||
"Minor": 133, | ||
"Patch": 2 | ||
"Minor": 134, | ||
"Patch": 0 | ||
}, | ||
"preview": true, | ||
"demands": [], | ||
"instanceNameFormat": "Use Python $(versionSpec)", | ||
"groups": [ | ||
{ | ||
"name": "advanced", | ||
"displayName": "Advanced", | ||
"isExpanded": false | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"name": "versionSpec", | ||
|
@@ -34,6 +41,19 @@ | |
"required": true, | ||
"defaultValue": "true", | ||
"helpMarkDown": "Whether to prepend the retrieved Python version to the PATH environment variable to make it available in subsequent tasks or scripts without using the output variable." | ||
}, | ||
{ | ||
"name": "architecture", | ||
"type": "pickList", | ||
"label": "Architecture", | ||
"defaultValue": "x64", | ||
"required": true, | ||
"helpMarkDown": "The target architecture (x86, x64) of the Python interpeter.", | ||
"groupName": "advanced", | ||
"options": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure if this is appropriate here, but in most cases with options like this we have a "default" option that is selected automatically and allows the Task to make the most appropriate choice. I.e. choose the one that matches the OS arch. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See a few lines above, the default is x64. The agent's architecture won't be known at build definition time, but the hosted agents only have x64 Pythons. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have the "default" on several picklists (e.g. Java version) to make it just work on any agent but it does cause a lot of confusion. In this case not having "default" is better. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jpricketMSFT Sorry, I think I misunderstood you the first time. Sounds like you were talking about "passing null" to the task and letting the task choose at runtime. But I think the best experience is to pass 'x64' unless the user says otherwise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that is basically what I was thinking, but as Madhuri says, it can cause a lot of confusion. This is better. |
||
"x86": "x86", | ||
"x64": "x64" | ||
} | ||
} | ||
], | ||
"outputVariables": [ | ||
|
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 looks like you can make this
const
.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.
Yeah, I've come around to your opinion on this. I'll change this next time I touch this file.