Skip to content

Workspace directory#2495

Merged
oliversun9 merged 10 commits intomainfrom
workspace-directory
Oct 16, 2023
Merged

Workspace directory#2495
oliversun9 merged 10 commits intomainfrom
workspace-directory

Conversation

@oliversun9
Copy link
Contributor

Fixes #2480
This fixes the problem where in some occasions dependencies from workspace are not loaded correctly when --path is passed. For example, buf build workspacedir/a --path workspacedir/a/foo.proto when workspacedir/b and workspacedir/c also exist. In module_file_set_builder.go module b and module c would be hashed based on their TargetFileInfos, which are both empty slices due to the --path filter. Same hash means only one of them gets added to the list of potential dependencies.

In this PR, workspace modules are distinguished by their directories relative to the workspace directory. This is accomplished by adding WorkspaceDirectory to interface bufmodule.Module.

Loading
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.

Calling buf linter or generate on a remote git repository returns a dependency does not exist error

2 participants