fix loading tests in Open Source version

This required giving up on the len(patterns) = len(loaded) assumption,
which in turn required refactoring how the concurrency is structured.

I tested that edge cases like -parallel_jobs=1 and -parallel_jobs=35
(for a conversion with 35 packages) work correctly.

Also consider .pb.go files as generated while here.

fixes golang/open2opaque#3
fixes golang/open2opaque#4

PiperOrigin-RevId: 707109446
Change-Id: I2241e4a9a54613e68efee437b691946c66a3bfd3
Reviewed-on: https://go-review.googlesource.com/c/open2opaque/+/637135
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Nicolas Hillegeer <aktau@google.com>
Auto-Submit: Michael Stapelberg <stapelberg@google.com>
2 files changed
tree: 1579c8e43678deebdb4b8a04e0405cb8906f7c8c
  1. internal/
  2. testdata/
  3. CONTRIBUTING.md
  4. gen.go
  5. genprotos.go
  6. gentestdata.go
  7. go.mod
  8. go.sum
  9. LICENSE
  10. open2opaque.go
  11. open2opaque_flush.go
  12. README.md
  13. regenerate.bash
README.md

open2opaque

The program open2opaque migrates Go code using Go Protobuf from the Open API to the Opaque API.

See https://go.dev/blog/protobuf-opaque for context.