When v1.15 was implemented, which replaces desc/protoparse with thin veneer on top of the github.com/bufbuild/protocompile module, a new constraint was inadvertently added, requiring that files explicitly named in parser.Parse had to be provided as source and could not be provided as descriptors. But this constraint was not present in v1.14.1 and thus a regression for any code that took advantage of the lack of that constraint.
Similarly, when the Parser.ParseFilesButDoNotLink method was re-implemented, it was incorrectly using Parser.ImportPaths, despite the Go docs for that field saying they are unused for the "do not link" operation.
This PR fixes both of these regressions, so more code that uses v1.14 can correctly be upgraded to use v1.15.
Fixes #590 and #591.
When v1.15 was implemented, which replaces
desc/protoparse
with thin veneer on top of thegithub.com/bufbuild/protocompile
module, a new constraint was inadvertently added, requiring that files explicitly named inparser.Parse
had to be provided as source and could not be provided as descriptors. But this constraint was not present in v1.14.1 and thus a regression for any code that took advantage of the lack of that constraint.Similarly, when the
Parser.ParseFilesButDoNotLink
method was re-implemented, it was incorrectly usingParser.ImportPaths
, despite the Go docs for that field saying they are unused for the "do not link" operation.This PR fixes both of these regressions, so more code that uses v1.14 can correctly be upgraded to use v1.15.