Skip to content

buf build xyz.tar fails if a file in this archive has an extended attribute #2387

@oliversun9

Description

@oliversun9

Files created in vscode, and potentially other apps, have an extended attribute. Making a tape archive (.tar) and invoke buf build on such an archive will fail.

Steps to reproduce:
Run the following in the terminal built in to mac (not the one from vscode)

% mkdir dir1 dir2                              
% mv somewhere/vscode.proto dir1/vscode.proto #### assuming such a file exists and is created by vscode
% echo "message Foo {}" > dir1/vscode.proto    
% echo "message Bar {}" > dir2/terminal.proto  
% ls -al@ dir1/vscode.proto                    
-rw-r--r--@ 1 oliversun  staff  15 18 Aug 16:46 dir1/vscode.proto
	com.apple.provenance	11 
% ls -al@ dir2/terminal.proto                  
-rw-r--r--  1 oliversun  staff  15 18 Aug 16:46 dir2/terminal.proto
% tar -cvf t1.tar dir1                         
a dir1
a dir1/vscode.proto
% tar -cvf t2.tar dir2                         
a dir2
a dir2/terminal.proto
% buf --version                                
1.22.0
% buf build t2.tar 
% buf build t1.tar
dir1/._vscode.proto:1:1:invalid control character
dir1/._vscode.proto:1:1:syntax error: unexpected error
dir1/._vscode.proto:1:2:invalid control character
...

Verified on 1.22.0 and 1.26.2-dev (latest main).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions