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

Issue 1943643002: Go bindings: Change generated enum value constants to be typed as the enum type. (Closed)

Created:
4 years, 7 months ago by rudominer
Modified:
4 years, 7 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Go bindings: Change generated enum value constants to be typed as the enum type. This change does not address the debate in https://github.com/domokit/mojo/issues/765 regarding the naming of the enum value constants. It only addresses the problem described in the bug description, namely that the enum constants do not have the right type. - The primary change is in enum.tmpl - I added a new test, enums_test.go. In so doing I beefed up test_enums.mojom. This required re-generating the Dart file for this mojom. - Adding the test revealed an unrelated bug which I fixed in mojom_go_generatory.py BUG=#765 R=vardhan@google.com Committed: https://chromium.googlesource.com/external/mojo/+/2f2d1bece6eb2dae607edadbc7355cec65e892fb

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -6 lines) Patch
M mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart View 2 chunks +67 lines, -1 line 0 comments Download
M mojo/go/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A mojo/go/tests/enums_test.go View 1 chunk +28 lines, -0 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/test_enums.mojom View 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/go_templates/enum.tmpl View 1 chunk +8 lines, -4 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_go_generator.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (8 generated)
rudominer
Hi Vardhan, ptal.
4 years, 7 months ago (2016-05-03 01:30:56 UTC) #8
vardhan
lgtm
4 years, 7 months ago (2016-05-03 17:04:26 UTC) #9
rudominer
4 years, 7 months ago (2016-05-03 17:24:49 UTC) #11
Message was sent while issue was closed.
Committed patchset #1 (id:100001) manually as
2f2d1bece6eb2dae607edadbc7355cec65e892fb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698