Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): resolve against cwd separately #1474

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

noahdietz
Copy link
Collaborator

Restore explicit proto filename resolution against "." removed in #1466. It was removed to facilitate proto filename resolution relative to cwd for file names that weren't prefixed with ./, but this ended up breaking it for those prefixed with ./. Instead of attempt to include "." as an import path to resolve against alongside the CLI provided ones, we resolve against it afterwards. This is because the protoparse.ResolveFilenames will not resolve the file name if it is relative to any of the import paths, but we need it to in case the user provides a mix of import paths and cwd relative values. In this case, the prefix ./ needs to be resolved as well.

Tested it against both reported issue cases.

Updates #1471.

@noahdietz noahdietz requested a review from a team as a code owner February 14, 2025 16:24
@noahdietz noahdietz added automerge Summon MOG for automerging and removed automerge Summon MOG for automerging labels Feb 14, 2025
@noahdietz noahdietz merged commit 6206451 into googleapis:main Feb 14, 2025
5 checks passed
@noahdietz noahdietz deleted the fix-local-dot-resolution branch February 14, 2025 16:39
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Summon MOG for automerging label Feb 14, 2025
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.

2 participants