You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I copy that entire subdirectory into a new project:
buck-rust-hello〉git statusOn branch mainChanges to be committed: (use "git restore --staged <file>..." to unstage) modified: .buckconfig new file: .buckroot deleted: .gitmodules modified: BUCK new file: README.md new file: cpp/hello_world/BUCK new file: cpp/hello_world/func.cpp new file: cpp/hello_world/func.hpp new file: cpp/hello_world/main.cpp new file: cpp/library/BUCK new file: cpp/library/library.cpp new file: cpp/library/library.hpp new file: cpp/rules.bzl new file: go/BUCK new file: go/go_binary.bzl new file: go/main.go new file: go/rules.bzl deleted: prelude new file: prelude.bzl new file: prelude/prelude.bzl new file: rust/BUCK new file: rust/main.rs new file: rust/rules.bzl modified: toolchains/BUCK new file: toolchains/cpp_toolchain.bzl new file: toolchains/export_file.bzl new file: toolchains/go_toolchain.bzl new file: toolchains/rust_toolchain.bzl new file: toolchains/symlink.bat
Now, why this is failing is very interesting: it's looking for a binary named main, but rustc will be producing one called main.exe. What's extra confusing to me, after scouring all of these rules for the past few hours, is that:
main.exe is being produced by the compiler in the new repo:
buck-rust-hello〉ls buck-out\\v2\\gen\\root\\6dd044292ff31ae1\\rust\\__main__\\╭───┬──────────────────────────────────────────────────────────────┬──────┬─────────┬──────────────╮│ # │ name │ type │ size │ modified │├───┼──────────────────────────────────────────────────────────────┼──────┼─────────┼──────────────┤│ 0 │ buck-out\v2\gen\root\6dd044292ff31ae1\rust\__main__\main.exe │ file │ 5.0 MiB │ a minute ago ││ 1 │ buck-out\v2\gen\root\6dd044292ff31ae1\rust\__main__\main.pdb │ file │ 1.2 MiB │ 2 hours ago │╰───┴──────────────────────────────────────────────────────────────┴──────┴─────────┴──────────────╯
but it is producing main with no extension in the demo sub-repo:
buck2\examples\no_prelude〉ls buck-out\v2\gen\root\6dd044292ff31ae1\rust\__main__\╭───┬──────────────────────────────────────────────────────────────┬──────┬───────────┬─────────────╮│ # │ name │ type │ size │ modified │├───┼──────────────────────────────────────────────────────────────┼──────┼───────────┼─────────────┤│ 0 │ buck-out\v2\gen\root\6dd044292ff31ae1\rust\__main__\main │ file │ 159.5 KiB │ 2 hours ago ││ 1 │ buck-out\v2\gen\root\6dd044292ff31ae1\rust\__main__\main.pdb │ file │ 1.2 MiB │ 2 hours ago │╰───┴──────────────────────────────────────────────────────────────┴──────┴───────────┴─────────────╯
Does this behavior make sense? Is there some other bit of ambient configuration that I'm missing?
The text was updated successfully, but these errors were encountered:
I wouldn't think too hard about the no_prelude rules. The don't use the Prelude rust rules, so they aren't really complete enough to be expected to work.
Yeah, I was just trying to get something going on my local machine, and given that this example does build for me in-tree, was hoping it would be a bit simpler to get started with before trying to figure out what's up with the prelude :)
Given that's a longer-term solution anyways, seems good! I'll not chase down this thread. Thanks :)
If I am in the "no prelude" example directory, building the Rust project works just fine.
If I copy that entire subdirectory into a new project:
I get a failure:
Now, why this is failing is very interesting: it's looking for a binary named
main
, but rustc will be producing one calledmain.exe
. What's extra confusing to me, after scouring all of these rules for the past few hours, is that:main.exe
is being produced by the compiler in the new repo:but it is producing
main
with no extension in the demo sub-repo:Does this behavior make sense? Is there some other bit of ambient configuration that I'm missing?
The text was updated successfully, but these errors were encountered: