This repository has been archived by the owner on May 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Improve build.rs to not add extra files #58
Labels
Comments
Would it be possible to do it based off of suffix/prefix for now? If you removed the data.json did it work out fine? This seems similar to #53. Certain files/assets when included in the code seem to cause it to fail. |
There have been quite a few changes to build.rs recently. Is this still an issue? I'm guessing it is but better to be up to date on it. |
It is, yeah. Here's how to reproduce: > git clone https://github.com/steveklabnik/rustdoc
> cd rustdoc/frontend
> npm install
> npm run prod
> cd ..
> cargo build You'll see that Asset {
name: "data.json",
contents: include_str!("../frontend/dist/data.json")
}, |
One of the things we did in cargo was to allow for glob syntax to work whitelist workspace members. See rust-lang/cargo#3979. For rustdoc, we could do something like: let whitelist = vec!["assets/*", "ember-fetch/*", "index.hml", "robots.txt"]; We would then find every file under |
hjr3
added a commit
to hjr3/rustdoc
that referenced
this issue
Aug 4, 2017
build.rs would add every file in frontend/dist to asset.in. This would cause hard to debug errors when files were unintentionally placed in frontend/dist. Fixes steveklabnik#58
hjr3
added a commit
to hjr3/rustdoc
that referenced
this issue
Aug 8, 2017
build.rs would add every file in frontend/dist to asset.in. This would cause hard to debug errors when files were unintentionally placed in frontend/dist. Fixes steveklabnik#58
hjr3
added a commit
to hjr3/rustdoc
that referenced
this issue
Aug 8, 2017
build.rs would add every file in frontend/dist to asset.in. This would cause hard to debug errors when files were unintentionally placed in frontend/dist. Fixes steveklabnik#58
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In 718768e, we added a
build.rs
to properly package up the assets.The problem is, I just spent about two hours debugging a problem that boiled down to "hey steve had a
data.json
file lying inside offrontend/dist
for some reason. So my code was writing out adata.json
, only to immediately be overwritten by the old file. Ugh!We can't do a literal whitelist because of the hashes, but maybe blacklisting other files isn't good... I dunno.
The text was updated successfully, but these errors were encountered: