-
Notifications
You must be signed in to change notification settings - Fork 198
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
Crate fails to build and need clarification on when OUT_DIR is or should be defined #1823
Comments
|
## [1.0.10](v1.0.9...v1.0.10) (2022-09-07) ### Bug Fixes * workaround for this rust-lang/docs.rs#1823 ([#52](#52)) ([1ef4183](1ef4183))
Thank you very much for your prompt reply. Your explanation made perfect sense and led me to find this discussion: (It seems like I am not the only one using tooling that relies on procedural macros which output auxiliary information to the filesystem.) Based on that discussion, I tried again with an empty build.rs and this did the trick: https://docs.rs/crate/flowscripter_template_deno_rust_library/latest It's a bit of a hacky workaround but I think it is the only option I have. Again thanks. |
Crate name
flowscripter_template_deno_rust_library
Build failure link
https://docs.rs/crate/flowscripter_template_deno_rust_library/1.0.9/builds/624001
Additional details
This is caused by an attempted write by a
deno_bindgen
macro to a read-only directory as per the info:Most of the sandbox is a read-only file system, including the source directory of your crate and its dependencies. If your build.rs generates files that are relevant for documentation, consider writing to the cargo output directory, passed in the environment variable OUT_DIR.
Based on the above I submitted a patch to
deno_bindgen
which now checks for theOUT_DIR
env var and uses that when outputting abindings.json
file as part of the build.Change is here: https://github.com/denoland/deno_bindgen/pull/82/files#diff-6894d37ad1be13438ddf87f7ca5e444601fd2a3ad62196b5044885b89c0ec730R35
This change is in
deno_bindgen
0.6.0 which I am now using.However the problem still persists...
It looks like
OUT_DIR
is not defined when thedeno_bindgen
macro is run as part of thecargo doc
build but I am clueless as to whether I should expect it to be set or whether I should somehow set it...?I have followed local test procedures documented here:
https://blog.rust-lang.org/2019/09/18/upcoming-docsrs-changes.html
and by setting the
OUT_DIR
env var as follows:I can see the
bindings.json
file is written to thetarget
folder instead of the base folder of the build which causes the error.The text was updated successfully, but these errors were encountered: