Skip to content

desc/protoparse: fix recently identified regressions from v1.14#594

Merged
jhump merged 2 commits intomainfrom
jh/fix-other-recent-regressions
Jan 22, 2024
Merged

desc/protoparse: fix recently identified regressions from v1.14#594
jhump merged 2 commits intomainfrom
jh/fix-other-recent-regressions

Conversation

@jhump
Copy link
Copy Markdown
Owner

@jhump jhump commented Jan 22, 2024

Fixes #590 and #591.

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.

@jhump jhump merged commit e6d8c42 into main Jan 22, 2024
@jhump jhump deleted the jh/fix-other-recent-regressions branch January 22, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression upgrading from v1.14.1 to v1.15.4: absolute paths no longer accepted by parser.ParseFilesButDoNotLink

1 participant