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

Add rustdoc JS non-std tests #58330

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Feb 9, 2019

@QuietMisdreavus: You asked it, here it is!

r? @QuietMisdreavus

@QuietMisdreavus
Copy link
Member

QuietMisdreavus left a comment

I'm hesitant to do the doc compilation in the JS script, because compiletest already has code that we can reuse to build the docs.

I also kinda want to rename the existing rustdoc-js tests to rustdoc-js-std, and name this new category as plain rustdoc-js. (Eventually i'd like to ditch all the rustdoc-js tests that depend on std, but that's a different matter.)

}

function remove_docs(out_dir) {
spawnSync('rm', ['-rf', out_dir]);

This comment has been minimized.

@QuietMisdreavus

QuietMisdreavus Feb 18, 2019

Member

Will this work on Windows? The "delete files" command isn't the same.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Feb 19, 2019

Author Member

That's a good point!

console.error(error_text.join("\n"));
} else {
// In this case, we remove the docs, no need to keep them around.
remove_docs(out_folder);

This comment has been minimized.

@QuietMisdreavus

QuietMisdreavus Feb 18, 2019

Member

Removing the built docs every time means we have to rebuild them every time, even if the test crate never changed.

This is one of the reasons i wanted to move the logic into compiletest, because it can do that timestamp checking to build the docs only when the test (or rustdoc) has changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment