| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The important thing here is that we need to look up the object
_after_ we invoke any non-dispatched methods, since the object might
be an expired weak reference.
This required some related changes to tests and error types.
Additionally, it required us to change the return value of
Context::remove, since we can remove objects that are not completely
present.
|
| |
|
|
|
| |
The removed tests are ones that no longer make sense given our
simplified behavior.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We no longer plan to have all weak-refs automatically de-duplicated,
for reasons discussed at #868. This lets us discard a lot of code,
including code to check for Arc/weak identity.
I've disabled some unit tests here, but I'll add them back or
rewrite them (or discard them as irrelevant) by the end of the branch.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
| |
This fixes an "operator precedence can trip the unwary" warning that
showed up after I updated my toolchain to 1.85.
|
| |\
| |
| |
| |
| | |
rpc: Move support for weak references behind an experimental feature
See merge request tpo/core/arti!2742
|
| | |
| |
| |
| |
| | |
We haven't decided how these should work (see #868), so having them
present by default is a bad idea.
|
| |/
|
|
| |
They used to be deduplicated, but they haven't been for a while.
|
| | |
|
| |
|
|
|
| |
These will have different implementations soon; this is a more
logical place for them.
|
| |
|
|
|
|
|
|
|
| |
Unlike generational-arena, slotmap is maintained.
Unlike slotmap, slotmap-careful should never be able to reuse the
same key for two different objects.
Closes #1282.
|
| |
|
|
|
|
| |
This simplifies our implementation logic in a few places,
and simplifies our invocation syntax greatly. There are a few
infelicities, noted in `TODO RPC` comments.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
rpc: authentication and basic handle manipulation
See merge request tpo/core/arti!1200
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I've made doing some design choices here:
* Reserving "rpc" as a prefix for post-authentication
functionality that is not arti-specific.
* Declaring these to be methods on the session rather than methods
on the objects themselves.
There's a problem with defining an API to drop a weak reference; see
comment in code.
|
| |/
|
|
|
|
|
| |
Now that generation-arena has merged [@diziet's patch] to clarify
their license, we no longer need to disable it.
[@diziet's patch]: https://github.com/fitzgen/generational-arena/pull/56
|
| |
|
|
| |
This lets us simplify our logic a bit for strong references.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want each ID to have a unique form every time it is given out,
so that you can't use ID==ID to check whether Object==Object. (See
discussions leading to #848.)
We'd also like the form of object IDs to be a little annoying to
analyze, to discourage people from writing programs that depends on
their particular format. (We are reserving the right to change the
format whenever we want.)
We _don't_ want to use any cryptography here (yet), lest somebody
think that this is an actual security mechanism. (This isn't for
security; it's for encouraging developers to treat IDs as opaque.)
With that in mind, we now lightly obfuscate our generational indices
before returning them.
|
| |
|
|
|
| |
These are about to become nondeterministic-ish and probably shouldn't
use the Into/TryFrom traits.
|
| |
|
|
|
|
|
|
| |
Per discussion referenced at #848, we want each operation that
returns a strong object ID to return a new, distinct strong ID.
Note that we no longer need to put strong and weak references in the
same arena; we can clean this code up a lot down the road.
|
| |
|
|
|
|
| |
Now we generate object IDs that we can parse. This is about to be
obsolete once we change how we generate objects and their IDs for #848,
but we may as well start from a working state.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Now there can be one of each, since we want references and handles
to be conceptually separate.
(The alternative would be to say that an operation either "returns a
handle" or "returns a reference (which may become a handle) unless a
handle already exists.")
|
| |
|
|
|
| |
This fake version is completely silly, but it will do the job until
we figure out our MPL2 concerns.
|
|
|
See the comments on `TypedAddr` for some explanations about
why this is so tricky. Thanks to @diziet for helping me figure
this out.
|