Page MenuHomePhabricator

andmis (Andrey Mishchenko)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 4 2022, 12:45 PM (19 w, 15 h)

Recent Activity

Jan 7 2022

andmis added a comment to D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.

The current behavior when ColumnLimit: 0 and JavaScriptWrapImports: false formats this:

import {aaa} from "abc";
import {aaa, bbb, ccc} from "def";
import {aaa, bbb} from "defghi";
import {aaa, looooooooooooooooooooong, ccc,} from "ghi";
import {
  aaa,
  ccc,
  bbb
} from "jkl";
Jan 7 2022, 8:24 AM · Restricted Project, Restricted Project

Jan 6 2022

andmis added a comment to D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.

My guess that ColumnLimit: 0 is rarely used for JS is based on the objective fact that JS import formatting is (IMO very) buggy with the column limit set that way, and it took several years for us to hear a bug report about it. And "we should not make assumptions about what people will want" applies just as well to the proposal of force-wrapping at >= 2 imports.

Jan 6 2022, 6:28 AM · Restricted Project, Restricted Project
andmis added a comment to D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.

Thanks for the feedback. Two things:

Jan 6 2022, 4:57 AM · Restricted Project, Restricted Project

Jan 5 2022

andmis updated subscribers of D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.

That's what happens when you hit the column limit, when there is a column
limit. But do we really want every one-symbol import to wrap to 3 lines
when ColumnLimit: 0? Slash to force the user to unwrap every import, even
20-symbol 300-column imports, to a single line?

Jan 5 2022, 9:17 AM · Restricted Project, Restricted Project
andmis added inline comments to D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.
Jan 5 2022, 8:50 AM · Restricted Project, Restricted Project
andmis added a comment to D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.

Thanks all for the reviews. I've updated the patch and added responses to your comments.

Jan 5 2022, 7:54 AM · Restricted Project, Restricted Project
andmis updated the diff for D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.
  • Move source code for option documentation to Format.h, from which the RST is autogenerated.
  • Clean up tests in response to review feedback.
Jan 5 2022, 7:54 AM · Restricted Project, Restricted Project

Jan 4 2022

andmis updated the summary of D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.
Jan 4 2022, 6:20 PM · Restricted Project, Restricted Project
andmis requested review of D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0.
Jan 4 2022, 6:19 PM · Restricted Project, Restricted Project