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

rustfmt no such file or directory when used as data of sh_binary #1793

Closed
gferon opened this issue Jan 23, 2023 · 5 comments
Closed

rustfmt no such file or directory when used as data of sh_binary #1793

gferon opened this issue Jan 23, 2023 · 5 comments
Labels

Comments

@gferon
Copy link
Contributor

gferon commented Jan 23, 2023

We have a sh_binary that has a data dependency to @rules_rust//rust/toolchain:current_rustfmt_toolchain. After upgrading to rules_rust 0.16.1 from 0.14.0, this fails on runtime with a "no such file or directory" error and after checking, the files from rustfmt aren't symlinked as part of the .runfiles directory of this script.

I'm not sure what could have changed, but any help is appreciated to try and pin point the issue.

@illicitonion
Copy link
Collaborator

/cc @UebelAndre - maybe #1719?

@UebelAndre
Copy link
Collaborator

Can you share what runfiles you have?

@UebelAndre UebelAndre added the bug label Jan 23, 2023
@gferon gferon changed the title rustfmt no such file or directory on Darwin rustfmt no such file or directory when used as data of sh_binary Jan 23, 2023
@gferon
Copy link
Contributor Author

gferon commented Jan 23, 2023

Well, there's just nothing related to rustfmt. $(execpath @rules_rust//rust/toolchain:current_rustfmt_toolchain) returns external/rustfmt_nightly-2022-12-15__x86_64-unknown-linux-gnu_tools/bin/rustfmt but the MANIFEST file doesn't event mention anything of the sort.

EDIT: I also tried to use the toolchains attribute of sh_binary and the $(RUSTFMT) Make variable, which I suppose is the better approach, to no avail.

@UebelAndre
Copy link
Collaborator

Can you try the latest commit on main?

@gferon
Copy link
Contributor Author

gferon commented Jan 24, 2023

I just tried and it does work indeed (so #1794 solved this issue). Thanks!

@gferon gferon closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants