dtolnay / dtolnay/syn

Request for contributor docs: Running tests

Open
#1,856 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
3.4k
Forks
374
Avg merge
1d 5h
Merged PRs (30d)
2

Description

In PR 1855 I was able to run only the test that I implemented by running this command:

```term
$ cargo test --doc error::Error::combine --features test --release
```

I did this as it wasn't clear how to run all the tests. Running plain `cargo test` (with flags suggested from prior warnings/errors) produces errors:

```term
$ cargo test --release --all-features
...
error[E0554]: `#![feature]` may not be used on the stable release channel
--> tests/test_expr.rs:3:1
|
3 | #![feature(rustc_private)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0463, E0554.
For more information about an error, try `rustc --explain E0463`.
error: could not compile `syn` (test "test_expr") due to 12 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0554]: `#![feature]` may not be used on the stable release channel
--> tests/test_unparenthesize.rs:3:1
|
3 | #![feature(rustc_private)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `syn` (test "test_unparenthesize") due to 12 previous errors
```

When trying to figure this out I skimmed the README and checked for a CONTRIBUTING.md but those yielded no results. I found the ci.yml it uses https://github.com/dtolnay/rust-toolchain/tree/nightly/ which seems to use nightly. I wasn't sure if I'm expected to be running tests in nightly mode or not and at this point abandoned the initial goal of running all tests and focused on my specific use case.

If docs already exist, I missed them, sorry. It's not critical that they're added, but if a passerby knows how to execute the tests, I would appreciate that info below or added to the project documentation.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.