Giter VIP home page Giter VIP logo

rrustdoc's People

Contributors

fmease avatar

Watchers

 avatar

rrustdoc's Issues

Add minimal support for `ui_test`-style `compiletest` directives

E.g., // compile-flags: --crate-name=name, // edition: 2015, // revisions: one two, // aux-crate:dep=dep.rs.

Figure out if we can use https://github.com/Manishearth/compiletest-rs here to obtain those directives. If that isn't feasible, lex source files with ra_ap_rustc_lexer, extract line comments and manually parse a subset of compiletest directives in a semi ad hoc fashion.

After that, add a flag / mode / means to run rrustdoc on test/ui/{rustdoc,rustdoc-ui,rustdoc-json}/ files directly (i.e., without any modifications to those files). Figure out how to deal with revisions (obviously we should automatically run rrustdoc for each revision but the specifics like UX aren't clear).

Lex source files to look for `#![crate_name]`

Lex the Rust source files with ra-ap-rustc_lexer and implement a quick & dirty parser that looks for #![crate_name = "…"] for increased robustness and correctness.

At the moment we just do a string-based search.

Actually using such crate names should however still be gated behind -a/--crate-name-attr.

Support for multiple input source files

If multiple input source files are passed, we should do something very similar to cargo doc, i.e., “running rustc N-1 times and rustdoc N times” given N input files.

Figure out what -x/--cross-crate means if multiple files are passed. Probably reject.

We should have more “dev-y” configuration options available like passing --cfg doc to dependency crates (which is what Cargo doesn't do at the moment, CC rust-lang/rust#114952) or not running rustc at all (I don't know if that's useful, maybe for debugging cross-crate stuff; basically N input files => N rustdoc executions (modulo compiletest revisions, lol)).

Support for cfgs

--cfg KEY, --cfg KEY=VALUE; -f FEATURE (expands to --cfg 'feature="FEATURE"' (or something like that, I can't remember)).

Support “verbatim arguments” via `--` to be passed to `rustc` and `rustdoc`

For extensibility, we should support invocations of the form:

rrustdoc file.rs -- -a -b -c

Where the arguments following the -- get passed verbatim to rustc and rustdoc. This is not a replacement for the env vars RUSTFLAGS and RUSTDOCFLAGS (#5) since the latter gives you more control.

It's less flexible than the env vars but it's more ergonomic for sure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.