• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kbknapp / clap-rs / 2945
89%
master: 94%

Build:
Build:
LAST BUILD BRANCH: issues-839,840
DEFAULT BRANCH: master
Ran 27 Dec 2016 09:29PM UTC
Jobs 4
Files 57
Run time 8min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2945

push

travis-ci

homu
Auto merge of #786 - nabijaczleweli:feat/783-no_cargo, r=kbknapp

Add no_cargo feature to disable Cargo-env-var-dependent macros

For example, given:

```toml
clap = { path = "t:/clap-rs" }
```

The macros `crate_version!()` and `crate_authors!()` exist, so the crate compiles without errors:

```
   Compiling https v0.2.0 (file:///P:/Rust/http)
    Finished debug [unoptimized + debuginfo] target(s) in 6.93 secs
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
[Finished in 7.5s]
```

But, adding the `no_cargo` feature:

```toml
clap = { path = "t:/clap-rs", features = ["no_cargo"] }
```

The macros are removed, so the crate fails to compile:

```
   Compiling clap v2.19.2 (file:///T:/clap-rs)
   Compiling https v0.2.0 (file:///P:/Rust/http)
error: macro undefined: 'crate_version!'
  --> src\options.rs:40:22
   |
40 |             .version(crate_version!())
   |                      ^^^^^^^^^^^^^

error: macro undefined: 'crate_authors!'
  --> src\options.rs:41:21
   |
41 |             .author(crate_authors!())
   |                     ^^^^^^^^^^^^^

error: aborting due to 2 previous errors

error: Could not compile `https`.
```

Closes #783

6976 of 7652 relevant lines covered (91.17%)

3.28 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
src/app/settings.rs
1
100.0
src/macros.rs
1
100.0
src/errors.rs
2
100.0
src/app/parser.rs
Jobs
ID Job ID Ran Files Coverage
2 2945.2 27 Dec 2016 09:37PM UTC 0
91.54
Travis Job 2945.2
3 2945.3 27 Dec 2016 09:33PM UTC 0
91.54
Travis Job 2945.3
4 2945.4 27 Dec 2016 09:33PM UTC 0
91.5
Travis Job 2945.4
5 2945.5 27 Dec 2016 09:29PM UTC 0
90.53
Travis Job 2945.5
Source Files on build 2945
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2945
  • f97d85dd on github
  • Prev Build on homu-tmp (#2930)
  • Next Build on homu-tmp (#2955)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc