Basically, instead of trying to check for specific kinds of statements,
just check the types of all local variables.
Also included are some commented-out proposals for some slightly more
aggressive lints which might be useful (but trigger a little too
frequently at the moment).
Source-Repo: https://github.com/servo/servo
Source-Revision: bb88832c078fbb14fa03c413fac1252b2b755015
The integration is off by default for now. You can try it out with `./mach build --features "script/plugins/clippy"`.
We're using a branch of clippy with some of the lints changed to Allow, either because they don't apply to us, or because they're noisy and dwarf other warnings (but still should be fixed)
After going through the rest of Servo's warnings I'll figure out which lints we should be keeping.
There's a cargo bug with optional deps that makes it hard for this to work with Cargo.lock -- so this PR contains no changes to lockfiles (and running the build with clippy on may dirty the lockfile, though it gets fixed later)
Source-Repo: https://github.com/servo/servo
Source-Revision: 50e1c967e4299c1515575f73d407f5f6b977d818
Expands on the work by @wilmoz and cleans up the existing errors. Closes#7180. Closes#7111.
Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
Still needs snapshot.
Snapshot probably could also work as today's nightly (I wasn't able to download the latest one due to choppy internet), there isn't any plugins churn I know of
r? @larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 13e7de482c0f58ca5af30dbca5d94e6b9cedd1cd
fixes#6524. I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.
Source-Repo: https://github.com/servo/servo
Source-Revision: bbb39082e0f640400546d2084a450a8675820a82
> Here it is.
>
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
>
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
>
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
>
> Generational GC works. SM doesn't work without it.
>
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
>
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
>
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
>
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
>
> This has been tested with the following zeal settings:
>
> GC after every allocation
> JS_GC_ZEAL=2,1
>
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
>
> Verify pre barriers
> JS_GC_ZEAL=4,1
>
> Verify post barriers
> JS_GC_ZEAL=11,1
Source-Repo: https://github.com/servo/servo
Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
See #6376
r? @Ms2ger
Snaps don't exist yet, putting up the @larsbergstrom signal. The snap need not exactly match this commit, anything in the vicinity, or just master, should work really. (yay stability)
There's no particular reason behind this rustup except that I want to keep Servo running on almost-master as much as possible.
Source-Repo: https://github.com/servo/servo
Source-Revision: 67b121c0b82f4a2107d7b015f60bd025e04dc336
Fixes#5914
r? @nnethercote for the gfx changes
r? @kmcallister or @jdm for the plugin
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ca606aaba432741ce4e8274835f26db3a3581fc
r? @larsbergstrom
(The diff is borked here, but I only just added `if let`s and wrapped/unwrapped in `Annotatable`s)
Source-Repo: https://github.com/servo/servo
Source-Revision: ef7fa99bd2c4ff52be1c6361d9f1eca3775c88c5
r? @Manishearth
(there's just the one plugins-related change required)
Source-Repo: https://github.com/servo/servo
Source-Revision: a0fccea670124d5ccfef1c13fe1b5d2e58891236
fixes#5724, #5737
uses https://github.com/Manishearth/rust-tenacious (can be moved in-tree if needed)
I can make it `Deny` by default too (I'll add a cargo feature to tenacious), though we might want it on
`Warn` until we get some mileage on it.
Source-Repo: https://github.com/servo/servo
Source-Revision: d7987e43c944eb9b156bf3244c08fce4cb570db4