Commit Graph

266 Commits

Author SHA1 Message Date
Ian Jackson 0251e99680 tor-proto: Add a suppression to "fix" the CI
This is failing in CI.  I have no idea what the rules are and AFAICT
no-one is alleging that there is an actual bug in the attributes.

Empirically this suppression causes the script to pass.
2023-07-12 15:32:27 +01:00
Ian Jackson 01cb7ee0a1 clippy: in tests, allow clippy::useless_vec
This is a perf issue, only.  If tests are too slow, we will notice and
ca speed them up.  We should optimise for clarity and convenience,
rather than speed.

Forbidding this can result in churn between vec![] and [] as tests are
updated and changed.
2023-07-10 13:49:51 +01:00
Ian Jackson 43bf89d540 clippy: globally allow clippy::needless_raw_string_hashes
Rationale: no-one writes these by default without thinkinh.  If they
are unnecessary, then either the string must have had " in it
before (in which case it might do again), or it is near other strings
which *do* need it.

And having it does no harm; indeed IMO it can increase clarity.

Alternative to !1388's
  Fix new "needless_raw_string_hashes" lint from clippy +nightly
2023-07-10 13:49:51 +01:00
Ian Jackson 80f397fb0b Merge branch 'allow_missing_panics' into 'main'
add_warning: Tolerate clippy::missing_panics_doc

Closes #950

See merge request tpo/core/arti!1380
2023-07-07 12:53:46 +00:00
Nick Mathewson 7e2fa11065 add_warning: Tolerate clippy::missing_panics_doc
As of current nightly, this lint now includes expect()s,
which makes it trigger way more than we'd like.

See discussion on #950.
2023-07-06 14:29:40 -04:00
Nick Mathewson 486b6b8c82 tor-rtcompat: Simplify trivial all() expressions.
Clippy nightly doesn't like `#[cfg(all(...))]` with only a single
expression inside the `all(...)`.

This requires an adjustment in check_doc_features.
2023-07-06 14:26:43 -04:00
Nick Mathewson e98f79617a Replace our old complex semver-checks script.
Now with cargo semver-checks >= 0.22.1, we no longer need to
jump through hoops in order to only look at the `full` features.
This, combined with our work on `fixup-features`, lets us be
confident that we're only looking at semver breakage in experimental
code.
2023-06-29 13:22:25 -04:00
Ian Jackson 802200e238 lints: Promote clippy::print_stderr and clippy::print_stdout
These are available in our MSRV now, so we don't need to handle
specially.  We can just add them to the standard lint block.

(Lint block in every crate will be updated automatically in the next
commit.)
2023-06-21 12:14:10 +01:00
Ian Jackson 952bcb11ed CI: add script to test every crate with default features 2023-06-14 18:47:51 +01:00
Gabriela Moldovan 54120b37bd
maint/cargo-audit: Ignore RUSTSEC-2023-0040 (the users crate is unmaintained)
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-06-05 11:52:06 +01:00
Nick Mathewson 1f4cd3f389 New script to run cargo-semver-checks with appropriate options.
The options are rather complicated; because we do not want to
subject our experimental features to semver, we need to run generate
JSON rustdoc on our own and then pass that JSON to
cargo-semver-checks.  This in turn requires us to use the same
options that cargo-semver-checks uses, including "RUSTC_BOOTSTRAP".

I've left some TODOs here in places where we will likely want to
improve our code in the future.

See #711.
2023-05-31 10:04:29 -04:00
Nick Mathewson e5fa42e1c7 maint/check_license: Make MPL-2.0 into an allow-list
Previously we allowed this license unconditionally.  But because of its
non-self-enacting nature, we need the actual notice from its "exhibit A"
to appear somewhere that says that it applies to all the relevant code.

Therefore, we shouldn't take new MPL-2.0 dependencies without
hand-checking them.  (I am tentatively allowing option-ext, though,
since we already have an indirect dependency on that crate via
`directories`.)

For more info, see https://gitlab.torproject.org/tpo/core/arti/-/issues/845
2023-05-23 13:51:51 -04:00
Nick Mathewson 407a928022 thanks: Also acknowledge Suggested-By 2023-05-22 07:58:54 -04:00
Nick Mathewson 217a9ead49 maint/thanks: Split up some long pipelines 2023-05-18 13:28:45 -04:00
Nick Mathewson bd2b2a171f maint/thanks: Remove email addresses from git trailers
Okay, technically we're removing everything between the first `<` and
the `>` at the end of the line.
2023-05-18 13:27:03 -04:00
Nick Mathewson 8cf1ff5084 maint/thanks: Include some git trailers in acknowledgments
When building our list of acknowledgments, previously we would only
include author and committer names.

Now we also include anybody listed in the "Reported-by",
"Co-authored-by", and "Thanks" trailers.
2023-05-18 13:26:50 -04:00
Nick Mathewson 75776bb8a3 fixup-features: minor doc fix. 2023-05-15 08:27:48 -04:00
Nick Mathewson aa452d6627 fixup-features: Do not annotate non-features. 2023-05-15 08:27:48 -04:00
Nick Mathewson bcac88990f fixup-features: Do not add edges from non-features. 2023-05-15 08:27:48 -04:00
Nick Mathewson 3e61de4f48 fixup-features: distinguish internal and external edges
An external edge does not cause its target to be created as a feature.
2023-05-15 08:11:30 -04:00
Nick Mathewson 85ce5162f5 fixup-features: Add an option to not annotate. 2023-05-15 08:11:30 -04:00
Nick Mathewson ae6254ac35 fixup-features: ability to add annotations for everything. 2023-05-15 08:11:30 -04:00
Nick Mathewson d5c21884fd fixup-features: fix off-by-one in argument reading. 2023-05-15 08:11:30 -04:00
Nick Mathewson 690c0134fe fixup-features: Implement remaining rules. 2023-05-15 08:11:30 -04:00
Nick Mathewson 5046e2003f fixup-features: Enforce __is_experimental tagging rule. 2023-05-15 08:11:30 -04:00
Nick Mathewson d5a38fc5ed fixup-features: Revise our rule 2 enforcement to use newer APIs. 2023-05-15 08:11:30 -04:00
Nick Mathewson 6a468ee4ae fixup-features: Refactor "apply a list of changes" code into a new module. 2023-05-15 08:11:30 -04:00
Nick Mathewson 54e50205dd fixup-features: Make a feature graph type in a submodule
I tried to use petgraph, but it was optimized for performance over
usability, and the usability was beyond me.
2023-05-15 08:11:30 -04:00
Nick Mathewson 059af736e1 fixup-features: minor spelling and comment fixes. 2023-05-15 08:11:30 -04:00
Nick Mathewson 7c556eea67 fixup-features: Describe the semantics we actually want
The problem with our old rules is that "reachable from __nonadditive"
and "reachable from experimental" were not themselves sensible
definitions of nonadditive and experimental.

See
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1068#note_2887939
2023-05-15 08:11:30 -04:00
trinity-1686a 6d25a81a01 allow rustls-webpki license 2023-05-08 18:22:43 +02:00
Nick Mathewson 6cfc387f14 check-licenses: Permit MPL-2.0
The generational-arena crate is distributed under MPL-2.0,
so we need to allow it.

I believe that this license is fine and does not interfere with
our code or our users; the reviewer should double-check.
2023-05-04 10:35:05 -04:00
trinity-1686a 1b348f5613 fix macos reproducible builds 2023-04-16 13:22:18 +02:00
Nick Mathewson a9b1d8f612 Bump Rust version in reproducible build scripts
Now that we require 1.65, Rust 1.63 is no longer sufficient.
2023-04-13 07:31:20 -04:00
Nick Mathewson 104d64589d Increment MSRV to 1.65 in every crate. 2023-04-11 15:31:12 -04:00
Nick Mathewson 69ebbedc3c Add Gabi to exclude_contributors.
(We don't include Tor employees in our "thanks" section.)
2023-03-31 07:30:09 -04:00
Dimitris Apostolou 629fa80674
Fix typos 2023-03-24 09:56:08 +02:00
Ian Jackson 3038c7520d maint/check_todos: Offer advice on workarounds, if tripped 2023-03-21 13:08:51 +00:00
Ian Jackson ac2c56f92d Obscure various literal uses of the todo marker
In each case, use a circumlocution.
2023-03-21 13:08:51 +00:00
Ian Jackson 541c5338af maint/check_todos: New script 2023-03-21 13:08:14 +00:00
Nick Mathewson 61096d61c3 fixup-features: Use write-and-rename pattern. 2023-03-20 13:29:33 -04:00
Nick Mathewson cd4895e525 fixup-features: Improve a comment. 2023-03-20 13:29:33 -04:00
Nick Mathewson 630d87f9c1 fixup-features: Simplify "optionality" detection. 2023-03-20 13:29:33 -04:00
Nick Mathewson 96cd970398 New "fixup-features" tool to enforce properties in Cargo.tomls
See top-level main.rs comment for an explanation.

Closes #771
2023-03-20 13:29:33 -04:00
Ian Jackson 333ce4118b Merge branch 'check_env' into 'main'
maint: add a full dependency check

See merge request tpo/core/arti!1030
2023-03-01 12:48:20 +00:00
Ian Jackson ce2fee9166 Merge branch 'zlib' into 'main'
Approve zlib licence

See merge request tpo/core/arti!1035
2023-02-27 13:34:05 +00:00
Emil Engler 20e40d79db
maint: remove the dependency check from coverage
This commit removes the dependency check introduced by b4b8d040, because
it's task is now done by the recently added `check_env` script.
2023-02-24 18:32:06 +01:00
Emil Engler 4b2b6e06da
maint: add a full dependency check
This commit adds a script that checks the environment for it's suitable
as an Arti development environment.

It follows an idea pitched by Ian Jackson and me in !1025.
2023-02-24 18:32:06 +01:00
Ian Jackson df79d407d9 maint/check_licensse: Placate shellcheck
There's nothing wrong with the previous idiom since it's a trusted
variable, but whatever.
2023-02-24 17:27:43 +00:00
Ian Jackson 4756ad6e57 maint/check_licensse: Approve Zlib licence
This is a very permissive BSD/MIT-like licence.  I have reviewed the
licence text and it is inoffensive.

I want this for slotmap, in !1034
2023-02-24 17:14:27 +00:00