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
As part of #1171, the guest package projection codegen was moved to a build script that generates src/packages.rs. This was previously implemented in the proc macro, but this led to editor responsiveness issues and the projection frequently being out of date.
However, the build script adds a file to src instead of OUT_DIR, which is the convention for generated files in Rust. This is because, during testing, rust-analyzer often failed to autocomplete items that were defined in OUT_DIR/packages.rs, especially after the creation of a new package.
I was unable to reproduce that issue in a fresh Rust project with a mock build script that did something similar in a similar setup (wasm32-wasi, multiple binaries), making it difficult to narrow down the cause of the issue.
When we have some free time, we should figure out if we can get this working to avoid cluttering users' src directories. (That being said, there's the counter-argument that seeing the projection in filesystem makes it clearer to see what's happening. Could go either way.)
The text was updated successfully, but these errors were encountered:
As part of #1171, the guest package projection codegen was moved to a build script that generates
src/packages.rs
. This was previously implemented in the proc macro, but this led to editor responsiveness issues and the projection frequently being out of date.However, the build script adds a file to
src
instead ofOUT_DIR
, which is the convention for generated files in Rust. This is because, during testing, rust-analyzer often failed to autocomplete items that were defined inOUT_DIR/packages.rs
, especially after the creation of a new package.I was unable to reproduce that issue in a fresh Rust project with a mock build script that did something similar in a similar setup (wasm32-wasi, multiple binaries), making it difficult to narrow down the cause of the issue.
When we have some free time, we should figure out if we can get this working to avoid cluttering users'
src
directories. (That being said, there's the counter-argument that seeing the projection in filesystem makes it clearer to see what's happening. Could go either way.)The text was updated successfully, but these errors were encountered: