Skip to content

Determine rustc version and add it to the report - #81

Open
TheTechRobo wants to merge 7 commits into
rust-cli:masterfrom
TheTechRobo:master
Open

Determine rustc version and add it to the report#81
TheTechRobo wants to merge 7 commits into
rust-cli:masterfrom
TheTechRobo:master

Conversation

@TheTechRobo

@TheTechRobo TheTechRobo commented Aug 18, 2022

Copy link
Copy Markdown

This is a 🙋 feature.

Checklist

  • tests pass
  • tests and/or benchmarks are included - is this necessary/possible for this?
  • documentation is changed or added

Context

Fixes #31

Semver Changes

Major release - it changes the Report struct. I don't think 2.0 is released yet, so that would fit perfectly!

I have very little experience contributing to Rust crates, so if I made any mistakes, let me know!

@bjorn3

bjorn3 commented Aug 18, 2022

Copy link
Copy Markdown

Cargo also sets the RUSTC env var to the path to rustc. cargo -vV may not match rustc -vV. Especially when using a locally built toolchain using rustup toolchain link as in that case the default cargo (which is probably an official version) will be combined with the local rustc which in most cases has a huge version skew.

@TheTechRobo

Copy link
Copy Markdown
Author

Cargo also sets the RUSTC env var to the path to rustc.

Did not know that! I'll update that right now.

@TheTechRobo

Copy link
Copy Markdown
Author

@bjorn3 - getting this issue:

   Compiling human-panic v1.0.4-alpha.0 (/home/thetechrobo/human-panic)
error: environment variable `RUSTC` not defined
 --> /home/thetechrobo/human-panic/build.rs:6:22
  |
6 |     let cargo_path = env!("RUSTC");
  |                      ^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `human-panic` due to previous error

I'm on nightly.

@bjorn3

bjorn3 commented Aug 18, 2022

Copy link
Copy Markdown

You should use std::env::var("RUSTC").unwrap() instead. RUSTC is passed at runtime of the build script, but not at compile time.

@TheTechRobo TheTechRobo changed the title Determine Cargo version and add it to the report Determine rustc version and add it to the report Aug 18, 2022
@TheTechRobo

Copy link
Copy Markdown
Author

@bjorn3 - All done.

@bjorn3 bjorn3 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from one nit. Do note that I am not a member of this org, so you will have to wait on someone who is to review and merge.

Comment thread README.md Outdated
@TheTechRobo

Copy link
Copy Markdown
Author

Should I rebase this PR, or are the maintainers fine with 7 (maybe more later if there's more review) commits?

@bjorn3

bjorn3 commented Aug 18, 2022

Copy link
Copy Markdown

It probably won't hurt to squash. No idea what the maintainers prefer though.

@TheTechRobo

Copy link
Copy Markdown
Author

I'll probably have time to rebase this on Sunday.

epage pushed a commit that referenced this pull request Sep 12, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [prek](https://redirect.github.com/j178/prek) | patch | `0.4.5` →
`0.4.6` |

---

### Release Notes

<details>
<summary>j178/prek (prek)</summary>

###
[`v0.4.6`](https://redirect.github.com/j178/prek/blob/HEAD/CHANGELOG.md#046)

[Compare
Source](https://redirect.github.com/j178/prek/compare/v0.4.5...v0.4.6)

Released on 2026-07-01.

##### Enhancements

- Verify managed toolchain downloads before installation
([#&#8203;2229](https://redirect.github.com/j178/prek/pull/2229))
- Add `PREK_DOCKER_NO_INIT` to opt-out Docker `--init`
([#&#8203;2242](https://redirect.github.com/j178/prek/pull/2242))
- Improve subprocess error messages
([#&#8203;2257](https://redirect.github.com/j178/prek/pull/2257))
- Split run concurrency knobs: `PREK_CONCURRENT_HOOKS` and
`PREK_CONCURRENT_BATCHES`
([#&#8203;2276](https://redirect.github.com/j178/prek/pull/2276))

##### Performance

- Avoid allocating markdown extensions per file
([#&#8203;2245](https://redirect.github.com/j178/prek/pull/2245))
- Avoid unchanged config tracking writes
([#&#8203;2247](https://redirect.github.com/j178/prek/pull/2247))
- Delay trailing whitespace output buffer
([#&#8203;2244](https://redirect.github.com/j178/prek/pull/2244))
- Prefilter VCS permalink lines
([#&#8203;2253](https://redirect.github.com/j178/prek/pull/2253))
- Skip unnecessary submodule updates during hook repo clone
([#&#8203;2255](https://redirect.github.com/j178/prek/pull/2255))

##### Documentation

- Document `language_version` inferring for Python and Go
([#&#8203;2241](https://redirect.github.com/j178/prek/pull/2241))

##### Other changes

- Refactor env var handling
([#&#8203;2277](https://redirect.github.com/j178/prek/pull/2277))
- Use `serde-saphyr` for YAML string quoting
([#&#8203;2228](https://redirect.github.com/j178/prek/pull/2228))

##### Contributors

- [@&#8203;shaanmajid](https://redirect.github.com/shaanmajid)
- [@&#8203;j178](https://redirect.github.com/j178)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Every minute (`* * * * *`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/epage/_rust).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🙋 Including rustc version in report

3 participants