Commit Graph

189 Commits

Author SHA1 Message Date
Nick Mathewson 2ab5348ab2 Remove semver.md files. 2023-03-31 09:24:41 -04:00
Nick Mathewson 9ef115a7fb Patchlevel bumps for crates whose dependencies just changed.
These crates had no changes until just a moment ago. But since
we updated the versions on some of their dependents, they have now
changed themselves.  Thus they get patchlevel bumps.

```
tor-rtmock
tor-protover
tor-socksproto
tor-consdiff
tor-chanmgr
tor-dirclient
tor-hsservice
```
2023-03-31 08:30:14 -04:00
Nick Mathewson e208fb15ad Bump crate versions that have breaking changes
These crates have had breaking changes.  They are pre-1.0, so they get
a minor bump.

```
tor-basic-utils
tor-config
```
2023-03-31 08:28:06 -04:00
Nick Mathewson a81ab391ae Bump patchlevel on crates with non-breaking changes
For these crates, the changes are nontrivial, so we
_do_ bump the versions on which their dependent crates depend.

Fortunately, since they are all pre-1.0, we don't need to
distinguish semver-additions from other changes.  (Except for arti,
which _is_ post-1.0, but gets a patchlevel bump anyway.)

These are unstable crates with breaking changes:

```
tor-hscrypto
tor-hsclient
```

These have new or extended APIs:

```
safelog
tor-bytes
tor-cell
tor-linkspec
tor-llcrypto
tor-proto
tor-cert
arti-client
```

These have new unstable APIs or features:
```
tor-netdoc
tor-circmgr (also broke some unstable APIs)
arti (is post-1.0)
```

These have bugfixes only:
```
caret
tor-dirmgr
```
2023-03-31 08:24:39 -04:00
Nick Mathewson 7129807843 tor-linkspec: Add a constructor for UnparsedLinkSpec 2023-03-06 08:45:05 -05:00
Nick Mathewson 886faa96b3 Remove semver.md files now that 1.1.2 is out. 2023-02-28 10:06:41 -05:00
Nick Mathewson f41449d0bd Patchlevel bumps for remaining changed crates.
These crates have had small code changes, but no API additions:

tor-config
tor-socksproto
tor-cert
tor-chanmgr
tor-ptmgr
tor-guardmgr
tor-circmgr
tor-dirclient
tor-dirmgr
arti
tor-hsservice
tor-congestion

These crates have had API extensions:

fs-mistrust
tor-llcrypto
tor-bytes
tor-checkable
tor-linkspec
tor-netdoc
tor-persist
arti-client
2023-02-28 07:13:27 -05:00
Nick Mathewson bc68974212 tor-linkspec: New UnparsedLinkspec type.
Unlike linkspec, this doesn't validate the actual contents of the
specifiers. We'll use this so we can handle the linkspec list for an
introduction point in an HsDesc, and just pass it on when
constructing our circuits.

I haven't added any accessor or constructor functions, because I
don't expect to need them.
2023-02-17 15:26:23 -05:00
Ian Jackson a0a740ffc1 tor-linkspec: LinkSpec parsing: use read_nested_u8len (fmt) 2023-02-06 16:08:32 +00:00
Ian Jackson 5997d99a7a tor-linkspec: LinkSpec parsing: use read_nested_u8len
This eliminates hardcoded length values.
2023-02-06 16:08:21 +00:00
Nick Mathewson 7c1b6a5a81 Bump the patch version of every crate that had API additions
These crates had API or behavior changes that may affect downstream
crates. Fortunately, they're all version 0.x, and don't need minor
bumps for this.
2023-02-01 10:36:29 -05:00
Nick Mathewson 66f594a4b6 Bump the patch-level version of crates with _minor_ changes.
These changes influence behavior, but not effect compatibility.
(If I messed up, and any crate except for `arti` has non-breaking
API changes, that's still fine, since they are all version
0.x.)
2023-02-01 10:23:58 -05:00
Nick Mathewson 592d6bf8a3 Bump the patch version of each crate with _trivial_ changes.
These crates have not had changes to their behavior; as such it is
not necessary to bump their dependencies to require the new versions.
2023-02-01 10:10:36 -05:00
Nick Mathewson a6dd92843e Allow clippy::unchecked_duration_subtraction in tests
This panics on error, and we're fine with a panic on misbehavior in
tests.
2023-01-27 08:28:02 -05:00
Nick Mathewson bf04641c68 Disable clippy::unlinlined-format-args
This warning kind of snuck up on us! (See #748)  For now, let's
disable it.  (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)

Closes #748.
2023-01-27 08:27:47 -05:00
eta b525fccfb0 Merge branch 'ya-lint' into 'main'
tor-linkspec: Fix an unused lint

See merge request tpo/core/arti!935
2023-01-06 17:16:27 +00:00
eta 118050e54c Merge branch 'test-lints' into 'main'
Add test lint blocks to all "mod test"

See merge request tpo/core/arti!937
2023-01-06 17:16:09 +00:00
Emil Engler 8579bc66a8
doc: consistent summary line for the READMEs
This commit introduces a consistency to the summary line of all
README.md files in each and every crate.
2022-12-20 14:31:47 +01:00
Ian Jackson 125a455bdc test lint blocks: Add many many automatically
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
2022-12-12 18:00:30 +00:00
Ian Jackson 05ca80950e tor-linkspec: Fix an unused lint
Otherwise:

  cargo +stable clippy -p tor-proto --all-features --all-targets

Produces:

  warning: unused import: `PtTargetAddr`
   --> crates/tor-linkspec/src/traits.rs:9:28
    |
  9 | use crate::{ChannelMethod, PtTargetAddr, RelayIdRef, RelayIdType, RelayIdTypeIter};
    |                            ^^^^^^^^^^^^
2022-12-12 15:08:31 +00:00
Nick Mathewson e0aeda3071 Remove semver.md files now that 1.1.0 is released. 2022-11-30 17:10:29 -05:00
Nick Mathewson 38bef96b99 Bump the minor version of every crate.
We made this job easy this time around: by incrementing our MSRV, we
have forced ourselves to do at least a minor bump everywhere.
2022-11-30 15:10:16 -05:00
Ian Jackson 429d2c7cb7 bridge config: Rename accessors
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/904#note_2858480
2022-11-30 15:49:34 +00:00
Ian Jackson bb6c98bdc1 BridgeAddr tests: dedupe slightly 2022-11-30 15:49:34 +00:00
Ian Jackson 199a6e0754 Separate BridgeAddr and PtTargetAddr
As per
  https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220

This commit is difficult to split up.

The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
2022-11-30 15:49:34 +00:00
Nick Mathewson bdddb78828 Merge branch 'more-linkspec-tests' into 'main'
Add tests for a bunch of code in tor-linkspec

See merge request tpo/core/arti!867
2022-11-29 18:41:54 +00:00
Nick Mathewson 69744ef8f3 Remove deprecated aliases in tor-linkspec. 2022-11-29 10:56:59 -05:00
Nick Mathewson 45c4beff7a Fix up compatibility issues between linkspec tests and other patches 2022-11-28 08:29:33 -05:00
Nick Mathewson 777b6bee3d linkspec: Add some tests for ChannelMethod 2022-11-28 08:20:57 -05:00
Nick Mathewson 60bc179019 linkspec: Tests for PtTargetSettings 2022-11-28 08:19:47 -05:00
Nick Mathewson 119e5f6f75 PtTransportName: Remove unused accessors. 2022-11-28 08:19:47 -05:00
Nick Mathewson d990a23948 linkspec: Add tests for has_any_identity. 2022-11-28 08:19:45 -05:00
Nick Mathewson 145ab3c49b linkspec: Add test for lookup on no-ids. 2022-11-28 08:19:08 -05:00
Nick Mathewson aa72f3d8c8 Add a test for ByRelayIds::remove_by_all_ids 2022-11-28 08:19:08 -05:00
Nick Mathewson c62958c76f Add a default debug_redacted impl to save space. 2022-11-28 08:01:53 -05:00
Nick Mathewson 2aa0ae4016 linkspec: Give a Redacted form for chantarget. 2022-11-28 08:01:50 -05:00
Ian Jackson 1a39a0c7e9 Make ChannelMethod non-exhaustive
Enums with variants conditional on cargo features must be
non-exhaustive, because cargo features are supposed to be additive,
meaning that enabling a feature (which might happen due to some random
distant thing) ought not to break things using that enum.

There were surprisingly few places to fix this.
2022-11-24 17:17:36 +00:00
Ian Jackson 45a79bf725 tor-linkspec: Provide LoggedChanTarget type alias and utility method
This makes it easy to talk about, and construct, a
BoxSensitive<OwnedChanTarget>, which is what we'll use in errors.
2022-11-23 18:28:38 +00:00
Ian Jackson 822a6ce32b TransportId: Fix test case for no pt-target
Fixes

  cargo +stable clippy --manifest-path=/home/ian/Rustup/Arti/arti/Cargo.toml --locked --target-dir=target --offline -p tor-linkspec --no-default-features --all-targets

giving

  446 |             .method(ChannelMethod::Pluggable(PtTarget::new(
      |                                    ^^^^^^^^^ variant or associated item not found in `transport::ChannelMethod`
2022-11-22 14:59:25 +00:00
Ian Jackson 28ca346297 TransportId: Parse "bridge" as builtin transport
This will allow  transport="bridge"  in bridge configurations, etc.
Doing it at this layer means it will be recognised everywhere.
2022-11-22 14:59:25 +00:00
Ian Jackson 813f0a71c9 TransportId: Provide new_builtin and new_pluggable
I think normal Rustic practice is to provide a real constructor as
well as just `Default`.
2022-11-22 14:59:25 +00:00
Ian Jackson 331aa673ea TransportId: Provide name accessor and deconstructor
We are maintaining the notion that at some point this thing might
grow additional variants.
2022-11-22 14:59:25 +00:00
Ian Jackson 4b8010782a TransportId: Document and change string repr for builtin
* Change the Display of builtin to "-"
 * Parse "" and "-" as builtin, as well as "<none>"
 * Document this
2022-11-22 14:59:21 +00:00
Ian Jackson fe0970e28e TransportId: Add test case for builtin Display repr 2022-11-22 14:59:21 +00:00
Ian Jackson fec66077de BridgeAddr rename from PtTargetAddr: Update in tor-linkspec
And the error too.

We need this for the API for BridgeConfigBuilder, where the user can
specify any kind of target "address", even a hostname.

It's already non-conditional, it's just that the name is too limiting.

In this commit:
 * Change in tor-linkspec
 * Export transitional aliases
 * Add TODOs to remove the transitional aliases
2022-11-21 14:54:39 +00:00
Ian Jackson 224f4905e4 tor-linkspec: Provide deconstructors for PtTargetSettings and PtTarget 2022-11-21 14:54:39 +00:00
Nick Mathewson de9f3177b0 Fix a missing import in tests.
I'm not sure why the CI didn't reject this the first time around.
2022-11-18 10:34:19 -05:00
Nick Mathewson 47041bd4ce Merge branch 'refactor_into_ownedchantarget' into 'main'
CircMgr: Refactor DirSpecificTarget constructor

See merge request tpo/core/arti!866
2022-11-18 15:21:46 +00:00
Nick Mathewson ec148a63cb CircMgr: Refactor DirSpecificTarget constructor
This commit replaces the
`impl From<&T> for OwnedChanTarget where T:ChanTarget`
with a new `IntoOwnedChanTarget` trait. This lets us be explicit
that we're constructing an owned object, and not just converting
something.

No semver change needed, since these APIs haven't been released.

----------- (new description)
2022-11-18 09:55:46 -05:00
Nick Mathewson c666133be4 Merge branch 'mark-bridges-not-experimental' into 'main'
Mark bridge and PT-related APIs as non-experimental.

Closes #643

See merge request tpo/core/arti!865
2022-11-18 14:22:31 +00:00