Commit Graph

143 Commits

Author SHA1 Message Date
Ian Jackson 86c4f42c49 CI: Break out maint/via-cargo-install 2022-06-08 19:32:59 +01:00
Ian Jackson d00ba995be maint/cargo_sort: Tolerate toplevel Cargo.toml not being sorted 2022-06-08 18:27:45 +01:00
Ian Jackson ba016053de maint/toposort: Make shebang be python3, not python
Otherwise it doesn't work on sane systems where /usr/bin/python is
never an incompatible version from previously.
2022-06-08 17:17:20 +01:00
Ian Jackson 6f96736278 Merge branch 'check-license-fixes' into 'main'
Update check_licenses and add it to CI.

Closes #462

See merge request tpo/core/arti!559
2022-06-02 13:59:35 +00:00
Ian Jackson 2730bed5bd maint/add_warning: Convert remaining asserts 2022-05-31 19:16:09 +01:00
Ian Jackson 6c52fa675b maint/add_warning: Introduce ImproperFile and convert one assert 2022-05-31 19:14:19 +01:00
Ian Jackson 7e96664140 maint/add_warning: Use python3 argparse 2022-05-31 19:03:38 +01:00
Nick Mathewson 842e6a697d check_licenses: list new crates with manual license verification
Closes #462.

Note that the license on `ring` is slightly problematic for some
users, including as it does old the openssl license[^1], with
advertising clause and all.  That's not a blocker for us now, since
`ring` is not a required dependency.  But we wouldn't want `ring` to
become a mandatory dependency because of this.

[^1]: To make the situation even more complicated, modern openssl
      has relicensed under apache-2.0, but that doesn't necessarily
      help us, since ring took its code from boringssll, which
      forked from an older version of openssl.
2022-05-31 13:58:40 -04:00
Ian Jackson 47a10fa84c maint/add_warning: Add "how to fix" to error message
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/557#note_2808879
2022-05-31 18:54:08 +01:00
Ian Jackson 89b4a59048 maint/add_warning: Provide --check mode 2022-05-31 18:54:08 +01:00
Ian Jackson c2939b5f74 maint/add_warning: Change shebang to python3
"python" sometimes means Python 2.
2022-05-31 18:53:49 +01:00
Ian Jackson 00f82a7f4d maint/add_warning: Use .tmp~ for temp filename, not .bak
"bak" ought to be a backup file, with the old contents, which this
most definitely isn't.
2022-05-31 18:53:47 +01:00
Ian Jackson 2814fd99c1 lints: Add let_unit_value allow to add_warning
add_warning can now add allows.  This one was agreed in some other MR
for one crate.  Allow it everywhere.
2022-05-31 14:52:09 +01:00
Ian Jackson a8f3423107 lints: Add two missing ones to add_warning
These were in some crates, but not all.  Put them in add_warning
where they will propagate everywhere.
2022-05-31 14:52:09 +01:00
Ian Jackson 47a209fb31 lints: maint/add_warning: New marker-based mode
We don't process the in-script lint block, just paste it in, now.
This is less complicated.

This reverts/replaces
  "maint/add_warnings: Make it add the markers for its future self"
2022-05-31 13:00:31 +01:00
Ian Jackson 3ae7244f91 maint/add_warnings: Make it add the markers for its future self
We'll run this in a moment.  Then we'll revert it.
2022-05-31 13:00:31 +01:00
Ian Jackson ea5caf9ac2 lints: maint/add_warning: Improve ordering
The crates we have aren't consistent.  But changing this means the
deltas resulting from the script are smaller.
2022-05-31 13:00:31 +01:00
Ian Jackson a8331c588e maint/add_warnings: Tidy up, and add some commentary
This puts the actually-used lint list at the top.

No functional change.
2022-05-31 13:00:31 +01:00
Orhun Parmaksız bfd41ddb5f
Lexically sort Cargo.toml dependencies
Utilize cargo-sort: https://github.com/DevinR528/cargo-sort

Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-05-28 20:05:51 +03:00
Steven Murdoch 235fd78602 Fix "coverage -h" command
$SCRIPT_NAME is not defined so causes an error. Use $(basename "$0") instead.
2022-05-26 15:12:36 +00:00
trinity-1686a 545313a899 fix docker_reproducible_build not passing its parameters properly 2022-05-26 09:44:06 +02:00
trinity-1686a 0f14847023 update comments in coverage_fuzz_corpora 2022-05-25 22:29:04 +02:00
trinity-1686a 8eb843f2af make almost all scripts use bash and set euo pipefail 2022-05-25 22:25:58 +02:00
eta 6fc7a864c7 Remove cargo-husky, and replace with manual instructions
A build script reaching into your .git/hooks/ and modifying them
nonconsensually was a bit of a horrifying concept, and also made it hard
to build arti with the feature disabled. Remove this crate, and replace
it with manual instructions on how to install the hooks in
CONTRIBUTING.md.
2022-05-10 13:36:49 +01:00
trinity-1686a 3464cae490 use true instead of /bin/true
see https://gitlab.torproject.org/tpo/core/arti/-/issues/400#note_2800763
2022-05-05 21:05:42 +02:00
trinity-1686a 5bd38ab6dc generate aggregated coverage reports 2022-05-05 18:35:34 +02:00
eta 78ca87314c Merge branch 'explain_downgrade' into 'main'
Add a comment explaining what downgrade_dependencies is for.

See merge request tpo/core/arti!480
2022-05-03 10:57:48 +00:00
trinity-1686a 0fea8535df remove some unecessary crates from downgrade_dependencies
nix:0.4.2 is no longer a dependency
synstructure:0.12.0 is no longer required to build
2022-04-28 20:50:50 +02:00
Nick Mathewson 6fecbc721a Add a comment explaining what downgrade_dependencies is for. 2022-04-28 14:23:50 -04:00
trinity-1686a d1bd9e209f update tls-api to 0.8.0
and remove corresponding RUSTSEC from ignored list
2022-04-28 17:43:32 +02:00
Nick Mathewson 0425de104c downgrade_dependencies: Remove "quote" exception.
This is no longer necessary. :)
2022-04-26 12:16:22 -04:00
Ian Jackson 6da7a2e3e2 Use git source for derive_builder for now, for sub_builder feature
This commitid is the current head of my MR branch
  https://github.com/colin-kiegel/rust-derive-builder/pull/253
  https://github.com/ijackson/rust-derive-builder/tree/field-builder
Using the commitid prevents surprises if that branch is updated.

We will require this newer version of derive_builder.  The version
will need to be bumped again later, assuming the upstream MR is merged
and upstream do a release containing the needed changes.

We will need the new version of not only `derive_builder_core` (the
main macro implementation) but also`derive_builder` for a new error
type.
2022-04-21 14:07:28 +01:00
Dimitris Apostolou ea283584f5
Fix typos 2022-04-11 21:21:17 +03:00
Nick Mathewson adb94f8047 Merge branch 'cargo-audit' into 'main'
fix maint/cargo_audit not propagating error and add temporary exceptions

See merge request tpo/core/arti!452
2022-04-08 15:55:05 +00:00
trinity-1686a 777eb8a5fc fix maint/cargo_audit not propagating error and add temporary exceptions 2022-04-08 16:51:35 +02:00
trinity-1686a 7c4ad15fc3 use default toolchain from rustup instead of stable for coverage
using stable doesn't work for CI because a specific version like 1.60 is installed
2022-04-08 16:19:28 +02:00
trinity-1686a 98ed22ba55 bring back RUST_COVERAGE_TOOLCHAIN 2022-04-08 15:46:46 +02:00
trinity-1686a c113c607ac use rustc 1.60 (stable) for coverage 2022-04-07 23:04:10 +02:00
trinity-1686a 80ba587937 fix with_coverage script to exclude pub(crate) mod test from results 2022-03-24 19:53:53 +01:00
Ian Jackson 8a5d98f716 downgrade_dependencies: Upgrade darling
The new version of derive_builder requires a newer darling.
Ooops.  Upstream MR here:
  https://github.com/colin-kiegel/rust-derive-builder/pull/242

For now, upgrade darling.  When there's a new upstream derive_builder,
we can use it and drop this.
2022-03-16 16:34:44 +00:00
Nick Mathewson dcd74e7a64 tests/chutney: Merge chutney-launching scripts
Formerly, the "launch a chutney network" code was duplicated in
"setup" and "arti-bench", since "setup" always launched an arti
proxy, while "arti-bench" didn't want that functionality.

Now the "setup" script launches an arti proxy conditionally,
depending on whether the "proxy" argument is given.
2022-03-10 12:29:28 -05:00
Nick Mathewson 64fa8ea77d Omit arti-testing from coverage. 2022-03-04 15:24:38 -05:00
trinity-1686a 5e5864802d fix reproducible build summary giving invalid branch and commit id
fix #378
also fix unrelated error in nightly rustdoc CI
2022-03-04 19:25:40 +01:00
Nick Mathewson e15c47f762 Reproducible build: Bump to Rust 1.59 and Alpine 3.15
The Rust upgrade is necessary since our Cargo.lock file now requires
`ed25519` 1.4.0, which requires edition2021, which requires Rust
1.56 or later.

The Alpine upgrade is opportunistic: we might as well.

I've also added comments to remind us to keep the .gitlab-ci.yml
and docker_reproducible_build files in sync, since my first version
of this commit messed that up.

Closes #376.
2022-03-04 10:09:31 -05:00
Nick Mathewson f7009e238a add_warning: remove clone_on_ref_ptr
See !352
2022-03-01 15:38:46 -05:00
Nick Mathewson c646d3adca Add nix exception to downgrade_dependencies. 2022-02-28 13:25:14 -05:00
Ian Jackson 9618f85237 maint/downgrade_dependencies: Upgrade zeroize_derive, env_logger
The *earlier* versions of these crates pull in *dependencies* that
violate our MSRV policy by requiring a *later* version of Rust.

Empirically, env_logger 0.5.4 would be enough, but practice here seems
to be to just say "cargo update".
2022-02-28 17:11:59 +00:00
Nick Mathewson 6755648f6b Merge branch 'upgrade-dependencies' into 'main'
Upgrade a few dependencies to newer versions

See merge request tpo/core/arti!357
2022-02-25 16:30:00 +00:00
Nick Mathewson d3661927da Remove lexical-core from downgrade_dependencies exceptions. 2022-02-25 10:56:34 -05:00
trinity-1686a 9a95bac10a better config for fuzz 2022-02-23 17:49:28 +01:00