Skip to content
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

Project-wide build fixes and tweaks #167

Merged
merged 25 commits into from
Jul 13, 2022
Merged

Project-wide build fixes and tweaks #167

merged 25 commits into from
Jul 13, 2022

Conversation

rrbutani
Copy link
Member

Apologies for another hefty PR. This is mostly just mechanical changes, the commits more or less describe what's going on.

Highlights are:

  • all the dependencies are bumped to the latest versions
  • the remaining uses of nightly in the project have been removed; this lets us use --all-features with abandon
  • all the crates have been bumped to edition 2021
  • some broken tests that failed to compile have been fixed
  • all of the enabled-by-default warnings across the project have been fixed, running cargo build (and cargo test) is now completely quiet
    • this is good because it makes it easier to see errors, reducing cycle times
    • and this also means we'll pay more attention to the warnings rustc emits; the warn-by-default lints are quite good and have actually caught many of the mistakes we've made in the past (we just didn't notice because we had so many warnings)
  • extra lints have been moved to .cargo/config and no longer block the build
    • .cargo/config has a discussion of the tradeoffs involved
    • we do not pass cargo lint yet
  • we now have some cargo aliases (documented in the README)
  • we now have a VSCode workspace with tasks matching the cargo aliases

rrbutani added 25 commits July 11, 2022 22:43
…he match Rust 1.62

almost all of the nightly const fn features we required have been
stabilized
now that `OS_CONST` can be const by default, we can do away with the
`lazy_static!` `OS`!
the `const_panic` crate gives us the functionality we want on stable

this was the last thing blocking `--all-features` from building on stable
these have effectively already moved to the `tm4c` repo
(this are all the version bumps that did *not* require any changes in
the codebase)
whatever LLVM bug we were hitting with `black_box` seems to be resolved?
we actually had a little breakage! (`a'b` now parses `a` as a
string/character prefix)
the comment in .cargo/config outlines the upsides and downsides pretty
well but just to recap, quickly:
  - this is nice because it lets us:
    + avoid duplicating the same list of lints across all the crates
    + avoid blocking the build on these lints passing
    + give developers an easy way to run the same set of lints that
      CI will run without needing to push/make a PR/etc.
  - the downsides are that:
    + this does not integrate with your editor

in the future we'd want a solution like clippy.toml

if we're okay with requiring that developers install something,
cargo-cranky works today and works great as a `cargo clippy` replacement
with rust-analyzer so you can get the lint errors in your editor

but for now, this will do
the comments explain; similar kind of thing as the regular lints
@rrbutani rrbutani requested review from gipsond and pranav12321 July 12, 2022 04:00
@@ -381,7 +381,7 @@ mod tests {
#[test]
fn misc() {
let insn =
insn!(AND R0, R0, R0, => Unfortunately we'll take trailing commas, but don't do this!);
insn!(AND R0, R0, R0, => Unfortunately we will take trailing commas, but please do not do this!);
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you, Rust 2021, for enforcing formal writing... in our macro invocations.

Copy link
Contributor

@gipsond gipsond left a comment

Choose a reason for hiding this comment

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

lgtm

@rrbutani rrbutani merged commit 5e0f0eb into master Jul 13, 2022
@rrbutani rrbutani deleted the imp/build-fixes branch July 13, 2022 09:47
This was referenced Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants