Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The [sources] subtarget should copy files for generated targets
Summary: The `[sources]` subtarget (added in D41708907) creates a directory called `__srcs/` for IDEs to see the Rust files without running a full build. This directory uses symlinks with `mapped_srcs`. Unfortunately, VS Code always expands symlinks in LSP. This is fine for normal code, but for generated code we end up in files like `buck-out/...elided.../foo.thrift__/out/gen-rust/types.rs`. This `gen-rust` directory may not be a valid crate (no lib.rs), and won't match the paths in the rust-analyzer configuration. This issue is more visible after D67817956. Instead, always copy files into `__srcs/` for generated targets. Reviewed By: JakobDegen Differential Revision: D68132425 fbshipit-source-id: 0b81439b68a6968021f560fd83bae8ae3dd55471
- Loading branch information