Skip to content

Commit

Permalink
Temporary workaround for jhump/protoreflect#254
Browse files Browse the repository at this point in the history
  • Loading branch information
xitonix committed Aug 1, 2019
1 parent daa1886 commit 2c3964b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proto/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package proto
import (
"path/filepath"
"regexp"
"runtime"
"strings"
"sync"

Expand Down Expand Up @@ -74,6 +75,13 @@ func NewFileLoader(root string, prefix string, files ...string) (*FileLoader, er
ImportPaths: importPaths,
}

// Temporary workaround for: https://github.com/jhump/protoreflect/issues/254
if runtime.GOOS == "windows" {
for i := range resolved {
resolved[i] = filepath.ToSlash(resolved[i])
}
}

fileDescriptors, err := parser.ParseFiles(resolved...)
if err != nil {
return nil, errors.Wrap(err, "failed to parse the protocol buffer (*.proto) files")
Expand Down

0 comments on commit 2c3964b

Please sign in to comment.