Skip to content

Commit

Permalink
Stop using dart2dart in Makefile
Browse files Browse the repository at this point in the history
It has been deprecated for a long time and no longer works in Dart 1.18.

BUG=dart-archive/dart-protoc-plugin#58

Review URL: https://chromiumcodereview.appspot.com//2107023003 .
  • Loading branch information
Brian Slesinsky committed Aug 19, 2016
1 parent 18ab9c7 commit c6b927d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PLUGIN_SRC = \

OUTPUT_DIR=out
PLUGIN_NAME=protoc-gen-dart
PLUGIN_PATH=$(OUTPUT_DIR)/$(PLUGIN_NAME)
PLUGIN_PATH=bin/$(PLUGIN_NAME)

BENCHMARK_PROTOS = $(wildcard benchmark/protos/*.proto)

Expand Down Expand Up @@ -47,16 +47,8 @@ TEST_PROTO_SRCS=$(foreach proto, $(TEST_PROTO_LIST), \

PREGENERATED_SRCS=lib/descriptor.proto lib/plugin.proto


$(PLUGIN_PATH): $(PLUGIN_SRC)
[ -d $(OUTPUT_DIR) ] || mkdir $(OUTPUT_DIR)
# --categories=all is a hack, it should be --categories=Server once dart2dart bug is fixed.
dart2js --checked --output-type=dart --show-package-warnings --categories=all -o$(PLUGIN_PATH) bin/protoc_plugin.dart
dart prepend.dart $(PLUGIN_PATH)
chmod +x $(PLUGIN_PATH)

$(TEST_PROTO_LIBS): $(PLUGIN_PATH) $(TEST_PROTO_SRCS)
[ -d $(TEST_PROTO_DIR) ] || mkdir $(TEST_PROTO_DIR)
[ -d $(TEST_PROTO_DIR) ] || mkdir -p $(TEST_PROTO_DIR)
protoc\
--dart_out=$(TEST_PROTO_DIR)\
-I$(TEST_PROTO_SRC_DIR)\
Expand Down
2 changes: 2 additions & 0 deletions bin/protoc-gen-dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
dart bin/protoc_plugin.dart -c "$@"
12 changes: 0 additions & 12 deletions prepend.dart

This file was deleted.

0 comments on commit c6b927d

Please sign in to comment.