Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Issue 2937123003: [vpython] Fix flag parsing bug with "--". (Closed)

Created:
3 years, 6 months ago by dnj
Modified:
3 years, 6 months ago
Reviewers:
iannucci, qyearsley
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, maruel+w_chromium.org, tandrii+luci-go_chromium.org
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

[vpython] Fix flag parsing bug with "--". When flags are being parsed, if a flag intended for Python (not vpython) is encountered, and a subsequent argument includes "--", the parser will only return flags between the Python flag and the "--" delimiter, not the "--" delimiter or any arguments following it. This is incorrect. Fix the parser to return all arguments past the Python flag instead, and add a test for this. BUG=None TEST=unit Review-Url: https://codereview.chromium.org/2937123003 Committed: https://github.com/luci/luci-go/commit/30e084f872754dca234b8e4104456f44ec5ee29c

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M vpython/application/flag.go View 1 chunk +1 line, -1 line 1 comment Download
M vpython/application/flag_test.go View 1 chunk +6 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (6 generated)
dnj
PTAL!
3 years, 6 months ago (2017-06-15 18:27:18 UTC) #2
iannucci
lgtm
3 years, 6 months ago (2017-06-15 19:04:56 UTC) #4
commit-bot: I haz the power
This CL has an open dependency (Issue 2943513002 Patch 1). Please resolve the dependency and ...
3 years, 6 months ago (2017-06-15 19:05:01 UTC) #6
dnj
3 years, 6 months ago (2017-06-15 19:30:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2937123003/1
3 years, 6 months ago (2017-06-15 19:31:12 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://github.com/luci/luci-go/commit/30e084f872754dca234b8e4104456f44ec5ee29c
3 years, 6 months ago (2017-06-15 19:37:25 UTC) #12
qyearsley
3 years, 6 months ago (2017-06-15 20:12:54 UTC) #13
Message was sent while issue was closed.
LGTM

https://codereview.chromium.org/2937123003/diff/1/vpython/application/flag.go
File vpython/application/flag.go (right):

https://codereview.chromium.org/2937123003/diff/1/vpython/application/flag.go...
vpython/application/flag.go:36: candidates := args
One thing that isn't very clear to me when reading this file is, what does
candidates refer to here? The candidates are a subset of the args, but what are
they candidates for? Candidates for being vpython args? Also, what is fsArgs?

Powered by Google App Engine
This is Rietveld 408576698