Stream: t-compiler

Topic: x.py prints diffs on error now?


pnkfelix (Jan 13 2020 at 21:59, on Zulip):

Hey, did "we" change things recently to print the diff against master when x.py fails? (or at least when x.py tidy fails?)

pnkfelix (Jan 13 2020 at 22:00, on Zulip):

(or maybe this is somehow an artifact of git submodule update call... /me is so confused about the current output...)_

simulacrum (Jan 13 2020 at 22:00, on Zulip):

@pnkfelix maybe formatting diff?

simulacrum (Jan 13 2020 at 22:00, on Zulip):

x.py tidy runs x.py fmt --check internally

simulacrum (Jan 13 2020 at 22:01, on Zulip):

(if you paste the output I can maybe help more :)

pnkfelix (Jan 13 2020 at 22:01, on Zulip):

its definitely tidy

pnkfelix (Jan 13 2020 at 22:02, on Zulip):

https://gist.github.com/84be405c649c26a26dda0e7126f37f96

pnkfelix (Jan 13 2020 at 22:02, on Zulip):

oh!

pnkfelix (Jan 13 2020 at 22:02, on Zulip):

its running rustfmt, of course

pnkfelix (Jan 13 2020 at 22:03, on Zulip):

(and it doesn't like my particular line break choices)

pnkfelix (Jan 13 2020 at 22:03, on Zulip):

((right?))

simulacrum (Jan 13 2020 at 22:03, on Zulip):

seems like it

simulacrum (Jan 13 2020 at 22:04, on Zulip):

I think we may eventually move format check out, just because it can be annoying (though I personally don't run tidy locally either)

pnkfelix (Jan 13 2020 at 22:05, on Zulip):

I wouldn't mind it so much if the output were compatible with my regexps for emacs compilation-mode

pnkfelix (Jan 13 2020 at 22:05, on Zulip):

Or wait, maybe they are compatible, heh

pnkfelix (Jan 13 2020 at 22:05, on Zulip):

/me hadn't even tried to follow the link yet

pnkfelix (Jan 13 2020 at 22:05, on Zulip):

too confused to try the obvious thing

pnkfelix (Jan 13 2020 at 22:06, on Zulip):

no, wait, I was right the first time

pnkfelix (Jan 13 2020 at 22:06, on Zulip):

But I can probably add an appropriate regexp to rust-mode.el

simulacrum (Jan 13 2020 at 22:07, on Zulip):

perhaps :)

simulacrum (Jan 13 2020 at 22:07, on Zulip):

rustfmt should probably use rustc style errors

pnkfelix (Jan 13 2020 at 22:07, on Zulip):

odd that it forces a line break on that `println! call... is this the thing that Ralf has been complaining about?

pnkfelix (Jan 13 2020 at 22:07, on Zulip):

the lines fit in 100 characters...

pnkfelix (Jan 13 2020 at 22:07, on Zulip):

(...barely)

pnkfelix (Jan 13 2020 at 22:09, on Zulip):

yeah for some reason rustfmt seems very eager to insert a linebreak after the macro!(

pnkfelix (Jan 13 2020 at 22:09, on Zulip):

rather than allowing for

macro!(ARG1,
       ARG2,
       ARG3)
pnkfelix (Jan 13 2020 at 22:10, on Zulip):

/me will have to go look up corresponding debates on rustfmt style stuff

simulacrum (Jan 13 2020 at 22:10, on Zulip):

well, if it is going to wrap, then it's going to force a linebreak

simulacrum (Jan 13 2020 at 22:10, on Zulip):

since the function call style is

foo(
    arg1,
    arg2,
    ...
);
simulacrum (Jan 13 2020 at 22:10, on Zulip):

(when multi-line)

simulacrum (Jan 13 2020 at 22:11, on Zulip):

notably println! is "known" to rustfmt

pnkfelix (Jan 13 2020 at 22:11, on Zulip):

not

foo(arg1,
    arg2,
    arg3
);

?

simulacrum (Jan 13 2020 at 22:11, on Zulip):

I don't think so, no

simulacrum (Jan 13 2020 at 22:11, on Zulip):

or at least the style I suggest is consistent with function declarations

pnkfelix (Jan 13 2020 at 22:11, on Zulip):

hmm. Okay, not my cup of tea, but whatever

pnkfelix (Jan 13 2020 at 22:12, on Zulip):

yeah I know that function declarations often appear with a line break before the first formal parameter

pnkfelix (Jan 13 2020 at 22:12, on Zulip):

so i guess this follows from that

simulacrum (Jan 13 2020 at 22:12, on Zulip):

https://github.com/rust-dev-tools/fmt-rfcs/blob/master/guide/expressions.md#multi-line-calls

Last update: Jan 21 2020 at 08:20UTC