Friday, 2019-05-24

*** tpb has joined #vtr-dev00:00
*** litghost has quit IRC07:44
*** litghost has joined #vtr-dev07:52
acomodikem_: I have open some minor PRs: https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/600 and https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/59913:39
tpbTitle: netlist: port_bit_name fix by acomodi · Pull Request #600 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)13:39
mithroKem_: I'm running a little late today, will be around in 30 minutes and we can do the reformatting16:12
mithrokem_: I'm around now, shall we get started?16:43
*** kem_ has joined #vtr-dev17:47
mithroHeyo kem_!17:47
kem_mithro: Hey17:48
mithrokem_: I'm just getting libblifparse ready17:51
mithrokem_: Can you take a quick look at https://travis-ci.com/mithro/vtr-code-format/builds/113128925#L256 ?17:58
tpbTitle: Travis CI - Test and Deploy with Confidence (at travis-ci.com)17:58
mithrokem_: That is what the error on travis will look like17:58
kem_mithro: Looks good, perhaps we could echo out a title before the diff, so people would know what it represents18:01
mithrokem_: Okay, let me add that18:06
mithrokem_: How does https://travis-ci.com/mithro/vtr-code-format/builds/113131579 look?18:21
tpbTitle: Travis CI - Test and Deploy with Confidence (at travis-ci.com)18:21
mithrokem_: This is what I plan to merge into the vtr repositories -> https://github.com/mithro/vtr-code-format18:21
tpbTitle: GitHub - mithro/vtr-code-format (at github.com)18:21
mithrobrb - grabbing a coffee18:22
kem_mithro: Yep looks better18:23
kem_mithro: A couple of grammar nitpicks: 'You must make the following changes to match the formatting style', and 'The following files must be reformatted!'18:25
mithrokem_: Can you go through the clang-format file at https://github.com/mithro/vtr-code-format/blob/master/.clang-format and check it matches what you are after?18:35
tpbTitle: vtr-code-format/.clang-format at master · mithro/vtr-code-format · GitHub (at github.com)18:35
mithrokem_: https://clang.llvm.org/docs/ClangFormatStyleOptions.html18:36
tpbTitle: Clang-Format Style Options Clang 9 documentation (at clang.llvm.org)18:36
kem_mithro: I'll take a look18:39
kem_mithro: I think AlignAfterOpenBracket should be 'Align'18:39
mithroI'll be back in 5, actually getting that coffee now18:41
mithrokem_: Record which style changes you want in the doc here -> https://docs.google.com/document/d/1h4433ZyX9NpdETBofpZNdP-U2q4Rg0J8lf7-CJ7NkiI/edit#18:42
tpbTitle: VtR Formatting Plan - Google Docs (at docs.google.com)18:42
mithrokem_: I also suggest we use "AccessModifierOffset: -2"18:42
kem_mithro: Is the style you linked significantly different from the one we looked at a while ago? I was pretty happy with that one.18:43
kem_mithro: Its probably easier to just look at the resulting formatting and see if there are any issues and then figure out how to fix those18:44
mithrokem_: The code formatting output is here -> https://github.com/antmicro/libblifparse/commit/e99dc3a0cdcdd5a51b2938b05532ab43deb38bac18:49
mithro(back now btw :-)18:49
kem_mithro: Is that the same style as I looked at here: https://logs.timvideos.us/%23vtr-dev/%23vtr-dev.2019-03-07.log.html18:53
mithrokem_: I believe so, unless I've screwed up...18:53
kem_mithro: OK just checking18:53
mithroI mean, I don't necessarily say I haven't screwed up :-P18:54
kem_mithro: OK I think I've stuck the obvious tweaks in the doc19:00
mithrokem_: Okay, give me a moment19:00
kem_mithro: I'm wondering if it would be best to apply this style to VTR first, that way I can take a look through how it formats everything.19:01
mithrokem_: I can do that19:01
kem_mithro: VTR has more funky code to look at19:01
mithrokem_: Grammar should be fixed at https://travis-ci.com/mithro/vtr-code-format/builds/11313368919:02
tpbTitle: Travis CI - Test and Deploy with Confidence (at travis-ci.com)19:02
mithrokem_: FYI - This is the script I'm using to do the reformat run -> https://gist.github.com/mithro/9bf7ff31e55791c230f00da93de0da0b19:17
tpbTitle: vtr-auto-format.py · GitHub (at gist.github.com)19:17
mithrohttps://github.com/kmurray/libblifparse/compare/master...mithro:format?expand=119:18
tpbTitle: Comparing kmurray:master...mithro:format · kmurray/libblifparse · GitHub (at github.com)19:18
mithrokem_: Just running for the whole of vtr now19:19
kem_mithro: Looks like some of the style changes didn't make it in: 'AlignAfterOpenBrack: Align' 'SpacesBeforeTrailingComments: 1' 'AllowShortBlocksOnASingleLine: true'19:25
kem_mithro: I'd also probably add 'AllowShortCaseLabelsOnASingleLine: true'19:25
mithrokem_: I haven't added your changes yet...19:26
mithrokem_: https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/608/files19:44
tpbTitle: Automated reformat the vpr code base by mithro · Pull Request #608 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)19:44
mithrokem_: Just adding your suggested style changes now...19:46
mithrokem_: You still here?20:17
kem_mithro: Yep just review the diff with the latest changes20:18
mithrokem_: The changes to the clang config should be in the pull request now20:21
mithrokem_: I'm just going to run down stairs and grab some takeaway lunch, be back in 520:22
kem_Some preprocessor indenting was lost: https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/608/files#diff-59c8309bb5e408c01166639ecbc6f2b5R5020:25
tpbTitle: Automated reformat the vpr code base by mithro · Pull Request #608 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)20:25
kem_Looks like 'IndentPPDirectives: AfterHash' would fix it20:25
kem_https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/608/files#diff-31ec6c191fb261c72ad6804a23bf1a26R21920:33
tpbTitle: Automated reformat the vpr code base by mithro · Pull Request #608 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)20:33
kem_Looks like 'AllowShortIfStatementsOnASingleLine: WithoutElse' would fix it20:33
kem_For https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/608/files#diff-31ec6c191fb261c72ad6804a23bf1a26R263 'AllowShortCaseLabelsOnASingleLine: true'20:34
tpbTitle: Automated reformat the vpr code base by mithro · Pull Request #608 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)20:34
mithrokem_: Looks like WithoutElse is newer than Clang-Format-5.020:37
mithroI'm not sure how to tell when an option was added....20:40
mithroLooks like -> https://releases.llvm.org/6.0.0/tools/clang/docs/ClangFormatStyleOptions.html#20:41
mithrokem_: Looks like WithoutElse is only in the unreleased clang-9.0 :-(20:42
kem_mithro: OK, how about just setting it to true?20:42
mithrokem_: Testing...20:43
mithrokem_: Look now?20:47
mithrokem_: This is what you are after, right? -> https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/608/files#diff-31ec6c191fb261c72ad6804a23bf1a26R21820:48
tpbTitle: Automated reformat the vpr code base by mithro · Pull Request #608 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)20:48
kem_mithro: Yep!20:48
mithrokem_: Need to remember to push the config before I try and merge it -- works better :-P20:49
mithrokem_: I think I have all your suggested changes to the formatting options in now...20:53
kem_mithro: The only last issue I see is: https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/608/files#diff-4ac57f609972e5b875fd99f90d6f518eR70820:55
tpbTitle: Automated reformat the vpr code base by mithro · Pull Request #608 · verilog-to-routing/vtr-verilog-to-routing · GitHub (at github.com)20:55
kem_mithro: Not sure why its collapsing that way since it did the right thing elsewhere20:56
mithrokem_: How do you want that wrapped?20:56
kem_mithro: I'd expect the line-breaks to be respected but aligned to the open bracket20:59
mithrokem_: I think it is caused by "ColumnLimit: 0"20:59
mithroIt also might be BinPackParameters21:02
mithrokem_: Might I also suggest `IndentCaseLabels: false`?21:05
kem_mithro: OK I'm happy with things as is. It looks like if it is formatted consistently first (which that example was not) clang format does the right thing. It just means some manual one-time fix-ups are required in those cases.21:48
kem_mithro: I'm thinking to merge the formatting scripts etc and then do the format myself so I can do some of those fix-ups.21:49
mithrokem_: give me 10m21:52
mithrokem_: Still here?22:13
kem_mithro: Yep22:13
mithrokem_: Okay, here is what I suggest we do...22:14
mithrokem_: "git clone https://gist.github.com/mithro/9bf7ff31e55791c230f00da93de0da0b vtr-auto-format"22:15
tpbTitle: vtr-auto-format.py · GitHub (at gist.github.com)22:15
kem_mithro: OK22:16
mithrokem_: Go fork https://github.com/mithro/vtr-code-format into your user22:16
tpbTitle: GitHub - mithro/vtr-code-format (at github.com)22:16
kem_mithro: OK22:17
mithroAdd the following lines to your `~/.gitconfig` file22:17
mithro[rerere]22:17
mithro        enabled = true22:17
mithrokem_: Make sure you have clang-format-7.0 installed22:17
kem_mithro: Yep22:18
mithrokem_: Then for the thing you want to auto-format, fork it to under your user22:18
kem_mithro: OK... where is this going?22:20
mithrokem_: then the process to generate an auto-format branch is; "cd vtr-verilog-to-routing; ~/github/kmurray/vtr-auto-format/vtr-auto-format.py --user kmurray" -- that should force push a `format` branch to https://github.com/kmurray/vtr-verilog-to-routing repository22:22
tpbTitle: GitHub - verilog-to-routing/vtr-verilog-to-routing: Verilog to Routing -- Open Source CAD Flow for FPGA Research (at github.com)22:22
mithrokem_: The script does;22:23
mithro(a)  git merge git+ssh://github.com/kmurray/vtr-code-format.git22:23
mithro(b) Let you fix the merge conflicts (which rerere should then save)22:23
mithro(c) Run the format command22:23
mithro(d) Commit it22:23
mithro(e) Add a commit telling git hyper-blame to ignore the formatting commit22:24
mithro(f) push the changes to the `format` branch of your github repository22:24
mithrokem_: Be warned that it resets things to `origin/master` before running22:24
mithrokem_: The idea is that you keep fixing the settings in the vtr-code-format repository and then rerun the vtr-auto-format command which regenerates the output based on that...22:25
kem_mithro: OK, I'll give it a try22:27
mithrokem_: If something goes wrong, I'm here to help22:30
mithroI'm just trying to figure out the best way to make sure everyone has a copy of clang-format-722:30
mithrokem_: What developer environments do you support?22:31
kem_mithro: Mostly ubuntu, these days typically 16.04 and 18.04. Although we still build and test on 14.0422:31
mithrokem_: Okay22:32
mithrokem_: The author for the formatting changes should be "VtR Robot <[email protected]>"22:34
mithrokem_: How's it going?22:56
mithrokem_: I just looking at a good way to get people a clang-format version...23:25

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!