Ticket #1519 (closed defect: fixed)
generate-racket can't work on windows [2]
Reported by: | yed.liu@… | Owned by: | murphy |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | murphy/protobuf.plt | Keywords: | windows |
Cc: | baoti | Version: | (1 0) |
Racket Version: |
Description
I.
The proto file request.proto:
message SearchRequest { required string query = 1; optional int32 page_number = 2; optional int32 result_per_page = 3; }
generate-racket.rkt:
(require (planet murphy/protobuf:1/generator)) (main)
and main.bat:
..\racket generate-racket.rkt
To generate racket:
D:\Program Files (x86)\Racket\ws>protoc --proto_path=. -plugin=protoc-gen-racket=main.bat --racket_out=. request.proto
*Result*:
--racket_out: protoc-gen-racket: Plugin output is unparseable: \r\nD:\\Program F
iles (x86)\\Racket\\ws>..\\racket generate-racket.rkt \r\nz\277\002\n\013reques
t.rktz\257\002#lang racket/base\n;; Generated using protoc-gen-racket v1.0.0\n(r
equire (planet murphy/protobuf:1/syntax))\n\n(define-message-type\n search-reque
st\n ((required primitive:string query 1)\n (optional primitive:int32 page-numb
er 2)\n (optional primitive:int32 result-per-page 3)))\n\n(provide (all-defined
-out))\n
II.
Other proto file service.proto which it use "import":
import "request.proto"; message SearchResponse { message Result { required string url = 1; optional string title = 2; repeated string snippets = 3; } repeated Result result = 1; }
To compile:
D:\Program Files (x86)\Racket\ws>protoc --proto_path=. --plugin=protoc-gen-racket=main.bat --racket_out=. service.proto
*Result*:
build-path/convention-type: specified convention incompatible with string path e
lement
path element: "/"
convention: 'unix
context...:
C:\Users\habreil\AppData?\Roaming\Racket\planet\300\5.3.6\cache\murphy\protobu
f.plt\1\0\generator.rkt:312:18: for-loop
C:\Users\habreil\AppData?\Roaming\Racket\planet\300\5.3.6\cache\murphy\protobu
f.plt\1\0\generator.rkt:303:9
D:\Program Files (x86)\Racket\collects\racket\port.rkt:125:0: with-output-to-
string
C:\Users\habreil\AppData?\Roaming\Racket\planet\300\5.3.6\cache\murphy\protobu
f.plt\1\0\generator.rkt:295:5: for-loop
C:\Users\habreil\AppData?\Roaming\Racket\planet\300\5.3.6\cache\murphy\protobu
f.plt\1\0\generator.rkt:295:5: for-loop
C:\Users\habreil\AppData?\Roaming\Racket\planet\300\5.3.6\cache\murphy\protobu
f.plt\1\0\generator.rkt:330:0: main
D:\Program Files (x86)\Racket\ws\generate-racket.rkt: [running body]
--racket_out: protoc-gen-racket: Plugin failed with status code 1.