brianchirls / proto-loader

Protocol Buffer loader module for webpack
27 stars 18 forks source link

Bug fix allowing diamond dependencies. #8

Open saarraz opened 8 years ago

saarraz commented 8 years ago

The current version would fail if a "diamond" dependency existed, for example: a.proto: message A { } b.proto: import "a.proto"; message B { } c.proto: import "a.proto"; import "b.proto"; --> ERROR: Duplicate message A defined.

The previous code does have a mechanism to avoid this (the 'loaded' object) but it is not passed down to recursive calls into readProto, which is a bug. Passing it down fixes the problem.

sdvcrx commented 8 years ago

+1