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

[Bug]: copy_files in ts_proto_library tries to copy non existing directories #645

Open
GuyMograbi opened this issue Jun 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GuyMograbi
Copy link

GuyMograbi commented Jun 26, 2024

What happened?

I want to copy the .js files generated by the proto target so I can run outside of bazel.

For that purpose, I used "copy_files", pointing to the JS files.

I added 2 entries - one for _connect.js and one for _pb.js.

It looks like it copies the first file, but then tries to copy all files under it - as if it was a directory


proto_library(
    name = "my_service_proto",
    srcs = ["my_service.proto"],
)

ts_proto_library(
        name = "my_service_ts_proto",
        proto_deps = [":my_service_proto"],
        copy_files = True,
        files_to_copy =[
                  "my_service_pb.d.ts",
                  "my_service_connect.d.ts",
                  "my_service_pb.js",
                  "my_service_connect.js"
         ],
    )

In the output I see it copies the file, but then files on copying a folder

Copying file <bazel_path_to>/my_service_pb.d.ts in /home/dev
Copying file <bazel_path_to>/my_service_connect.d.ts in /home/dev
Copying file <bazel_path_to>/my_service_pb.js in /home/dev
cp: cannot stat <bazel_path_to>/my_service_pb.js/*: No such file or directory

Version

Development (host) and target OS/architectures:

Output of bazel --version: 7.2.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file: 2.4.2

Language(s) and/or frameworks involved: typescript

How to reproduce

No response

Any other information?

No response

@GuyMograbi GuyMograbi added the bug Something isn't working label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant