Re: [dev-servo] Tidy lints

2018-08-19 Thread Anthony Ramine
I personally think they are extremely useful, because if they don't exist I end 
up fixing order of things when I touch code around them. It's almost obsessive.

That being said, it's 2018 and rustfix should be doing it for us.

> Le 18 août 2018 à 18:28, Emilio Cobos Álvarez  a écrit :
> 
> Do people generally find them useful?

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Tidy lints

2018-08-19 Thread Emilio Cobos Álvarez

On 08/19/2018 11:17 AM, Anthony Ramine wrote:

I personally think they are extremely useful, because if they don't exist I end 
up fixing order of things when I touch code around them. It's almost obsessive.


Can we enable import reordering in rustfmt instead?

 -- Emilio
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Tidy lints

2018-08-19 Thread Anthony Ramine
I don't know, but if your question is "would you mind using a tool to automate 
that stuff instead of a lint that complains?" then my answer is "yes, I too 
don't enjoy reordering things by hand".

> Le 19 août 2018 à 13:58, Emilio Cobos Álvarez  a écrit :
> 
> Can we enable import reordering in rustfmt instead?

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] dev-servo Digest, Vol 78, Issue 3

2018-08-19 Thread Peter Hrvola


> On 19 Aug 2018, at 14:00,  
>  wrote:
> 
> Send dev-servo mailing list submissions to
>   dev-servo@lists.mozilla.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.mozilla.org/listinfo/dev-servo
> or, via email, send a message with subject or body 'help' to
>   dev-servo-requ...@lists.mozilla.org
> 
> You can reach the person managing the list at
>   dev-servo-ow...@lists.mozilla.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dev-servo digest..."
> 
> 
> Today's Topics:
> 
>   1.  Tidy lints (Emilio Cobos ?lvarez)
>   2. Re:  Tidy lints (Anthony Ramine)
>   3. Re:  Tidy lints (Emilio Cobos ?lvarez)
> 
> 
> --
> 
> Message: 1
> Date: Sat, 18 Aug 2018 18:28:10 +0200
> From: Emilio Cobos ?lvarez 
> To: dev-servo@lists.mozilla.org
> Subject: [dev-servo] Tidy lints
> Message-ID: <7fe86421-cf37-8a8f-2cb1-36ce9051e...@crisal.io>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> I don't think the following tidy lints are very useful, and they always 
> make me spend some extra time fixing them up every time I sync code from 
> mozilla-central:
> 
>  * #[derive] trait name order.
>  * Lints that check `use` statements.
> 
> Do people generally find them useful?
> 
> I don't really think they are, and given we don't have an automatic way 
> to fix them (something like `./mach test-tidy --fix`) I'd prefer to 
> remove them, or to make `style` at least not require them. My feeling is 
> that their usefulness is just too little to justify the amount of time I 
> (and I suspect others) end up battling them.
> 
> What do you think?
> 
> Thanks,
> 
>  -- Emilio
> 
> 
> --
> 
> Message: 2
> Date: Sun, 19 Aug 2018 11:17:02 +0200
> From: Anthony Ramine 
> To: dev-servo@lists.mozilla.org
> Subject: Re: [dev-servo] Tidy lints
> Message-ID: <832dcebc-2808-4d64-af8e-2490b1bb1...@gmail.com>
> Content-Type: text/plain; charset=utf-8
> 
> I personally think they are extremely useful, because if they don't exist I 
> end up fixing order of things when I touch code around them. It's almost 
> obsessive.
> 
> That being said, it's 2018 and rustfix should be doing it for us.
> 
>> Le 18 ao?t 2018 ? 18:28, Emilio Cobos ?lvarez  a ?crit :
>> 
>> Do people generally find them useful?
> 
> 
> 
> --
> 
> Message: 3
> Date: Sun, 19 Aug 2018 13:58:56 +0200
> From: Emilio Cobos ?lvarez 
> To: dev-servo@lists.mozilla.org
> Subject: Re: [dev-servo] Tidy lints
> Message-ID: <570a7b0b-1f8a-56df-4393-47099ad56...@crisal.io>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> On 08/19/2018 11:17 AM, Anthony Ramine wrote:
>> I personally think they are extremely useful, because if they don't exist I 
>> end up fixing order of things when I touch code around them. It's almost 
>> obsessive.
> 
> Can we enable import reordering in rustfmt instead?
> 
>  -- Emilio
> 
> 
> --
> 
> Subject: Digest Footer
> 
> ___
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
> 
> 
> --
> 
> End of dev-servo Digest, Vol 78, Issue 3
> 

I have been recently digging into this. Just enabling reordering in rustfmt 
won’t help. Mach tidy must be modified to do the same checking as rustfmt 
(they’re different).

Cheers
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Tidy lints

2018-08-19 Thread Bobby Holley
Yeah. It's probably less important exactly what the order is and more that
there's a canonical order that a tool can detect and automatically fix
things to match. rustfmt fits the bill, so I think it makes sense to retire
that particular tidy lint.

On Sun, Aug 19, 2018 at 5:18 AM Anthony Ramine  wrote:

> I don't know, but if your question is "would you mind using a tool to
> automate that stuff instead of a lint that complains?" then my answer is
> "yes, I too don't enjoy reordering things by hand".
>
> > Le 19 août 2018 à 13:58, Emilio Cobos Álvarez  a
> écrit :
> >
> > Can we enable import reordering in rustfmt instead?
>
> ___
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
>
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Tidy lints

2018-08-19 Thread Anthony Ramine
We don't make use of rustfmt yet though (right? I was under a rock for 2 weeks 
so if I missed this excellent improvement, ignore me), so let's do that first 
IMO.

> Le 19 août 2018 à 19:43, Bobby Holley  a écrit :
> 
> rustfmt fits the bill, so I think it makes sense to retire
> that particular tidy lint.

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Tidy lints

2018-08-19 Thread Josh Bowman-Matthews

On 8/19/18 2:10 PM, Anthony Ramine wrote:

We don't make use of rustfmt yet though (right? I was under a rock for 2 weeks 
so if I missed this excellent improvement, ignore me), so let's do that first 
IMO.


Le 19 août 2018 à 19:43, Bobby Holley  a écrit :

rustfmt fits the bill, so I think it makes sense to retire
that particular tidy lint.




https://github.com/servo/servo/issues/21373 is tracking getting us 
formatted so that we can turn rustfmt on everywhere by default. Once we 
encounter the first cases of rustfmt's ordering not matching test-tidy, 
we can disable Servo's use ordering lint in order to merge those PRs.


Cheers,
Josh
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Tidy lints

2018-08-19 Thread Emilio Cobos Álvarez

On 8/19/18 9:54 PM, Josh Bowman-Matthews wrote:

On 8/19/18 2:10 PM, Anthony Ramine wrote:
We don't make use of rustfmt yet though (right? I was under a rock for 
2 weeks so if I missed this excellent improvement, ignore me), so 
let's do that first IMO.



Le 19 août 2018 à 19:43, Bobby Holley  a écrit :

rustfmt fits the bill, so I think it makes sense to retire
that particular tidy lint.




https://github.com/servo/servo/issues/21373 is tracking getting us 
formatted so that we can turn rustfmt on everywhere by default. Once we 
encounter the first cases of rustfmt's ordering not matching test-tidy, 
we can disable Servo's use ordering lint in order to merge those PRs.


We should probably re-enable rustfmt's import-reordering then[1], right?
I'll send a PR tomorrow if nobody wins me to that :)

 -- Emilio

[1]: 
https://github.com/servo/servo/blob/d34403047e806fa6c8c2468946f64429622ec434/rustfmt.toml#L4



Cheers,
Josh
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo