depot/third_party/nix/src/libstore/misc.cc, branch refs/r/3918 monorepo for the virus lounge http://code.tvl.fyi/depot/atom?h=refs%2Fr%2F3918 2020-08-23T11:58:44+00:00 refactor(tvix/libutil): Mark single-argument constructors explicit 2020-08-23T11:58:44+00:00 Vincent Ambo mail@tazj.in 2020-08-21T03:00:55+00:00 urn:sha1:1cf11317cac2c11d20b2324d4283814f1351c1a3 This is the clang-tidy lint 'google-explicit-constructor'. There's a whole bunch of breakage that was introduced by this, and we had to opt out a few types of this (esp. the string formatting crap). In some cases minor other changes have been done to keep the code working, instead of converting between types (e.g. an explicit comparison operator implementation for nix::Pid). Change-Id: I12e1ca51a6bc2c882dba81a2526b9729d26988e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1832 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi> refactor(3p/nix): Anchor local includes at src/ 2020-05-27T20:56:34+00:00 Vincent Ambo tazjin@google.com 2020-05-27T20:56:34+00:00 urn:sha1:3652326ed281f5f753423acef51103fb8df62a6d Previously all includes were anchored in one global mess of header files. This moves the includes into filesystem "namespaces" (if you will) for each sub-package of Nix. Note: This commit does not introduce the relevant build system changes. refactor(3p/nix): Apply clang-tidy's performance-* fixes 2020-05-20T21:58:43+00:00 Vincent Ambo tazjin@google.com 2020-05-20T21:58:43+00:00 urn:sha1:43677021e3c285c2ced2075b918da947e13fcb00 This applies the performance fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html refactor(3p/nix): Apply clang-tidy's readability-* fixes 2020-05-20T21:27:37+00:00 Vincent Ambo tazjin@google.com 2020-05-20T21:27:37+00:00 urn:sha1:689ef502f5b0655c9923ed77da2ae3504630f473 This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html refactor(3p/nix): Apply clang-tidy's modernize-* fixes 2020-05-20T03:33:07+00:00 Vincent Ambo tazjin@google.com 2020-05-20T03:33:07+00:00 urn:sha1:d331d3a0b5c497a46e2636f308234be66566c04c This applies the modernization fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html The 'modernize-use-trailing-return-type' fix was excluded due to my personal preference (more specifically, I think the 'auto' keyword is misleading in that position). refactor(3p/nix): Make all single-argument constructors explicit 2020-05-19T21:02:23+00:00 Vincent Ambo tazjin@google.com 2020-05-19T21:02:23+00:00 urn:sha1:88f337588c9f1a41ac67b3afb8d43f124b4d153b Implicit constructors can be confusing, especially in a codebase that is already as unintentionally obfuscated as this one. https://google.github.io/styleguide/cppguide.html#Explicit_Constructors style(3p/nix): Final act in the brace-wrapping saga 2020-05-19T19:51:32+00:00 Vincent Ambo tazjin@google.com 2020-05-19T19:47:23+00:00 urn:sha1:39087321811e81e26a1a47d6967df1088dcf0e95 This last change set was generated by a full clang-tidy run (including compilation): clang-tidy -p ~/projects/nix-build/ \ -checks=-*,readability-braces-around-statements -fix src/*/*.cc Actually running clang-tidy requires some massaging to make it play nice with Nix + meson, I'll be adding a wrapper or something for that soon. style(3p/nix): Add braces around single-line for-loops 2020-05-19T18:04:08+00:00 Vincent Ambo tazjin@google.com 2020-05-19T18:04:08+00:00 urn:sha1:1841d93ccbe5792a17f5b9a22e65ec898c7c2668 These were not caught by the previous clang-tidy invocation, but were instead sorted out using amber[0] as such: ambr --regex 'for (\(.+\))\s([a-z].*;)' 'for $1 { $2 }' [0]: https://github.com/dalance/amber style(3p/nix): Add braces around single-line conditionals 2020-05-19T17:55:58+00:00 Vincent Ambo tazjin@google.com 2020-05-19T17:55:58+00:00 urn:sha1:867055133d3f487e52dd44149f76347c2c28bf10 These were not caught by the previous clang-tidy invocation, but were instead sorted out using amber[0] as such: ambr --regex 'if (\(.+\))\s([a-z].*;)' 'if $1 { $2 }' [0]: https://github.com/dalance/amber style(3p/nix): Reformat all includes to match new style 2020-05-19T14:55:11+00:00 Vincent Ambo tazjin@google.com 2020-05-19T14:54:39+00:00 urn:sha1:c758de9d22506eb279c5abe61f621e5c8f61af95
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<feed xmlns="http://www.w3.org/2005/Atom">
<title>depot/third_party/nix/src/libstore/misc.cc, branch refs/r/3918</title>
<subtitle>monorepo for the virus lounge</subtitle>
<id>http://code.tvl.fyi/depot/atom?h=refs%2Fr%2F3918</id>
<link rel="self" href="http://code.tvl.fyi/depot/atom?h=refs%2Fr%2F3918"/>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/"/>
<updated>2020-08-23T11:58:44+00:00</updated>
<entry>
<title>refactor(tvix/libutil): Mark single-argument constructors explicit</title>
<updated>2020-08-23T11:58:44+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>mail@tazj.in</email>
</author>
<published>2020-08-21T03:00:55+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=1cf11317cac2c11d20b2324d4283814f1351c1a3"/>
<id>urn:sha1:1cf11317cac2c11d20b2324d4283814f1351c1a3</id>
<content type="text"> This is the clang-tidy lint 'google-explicit-constructor'. There's a whole bunch of breakage that was introduced by this, and we had to opt out a few types of this (esp. the string formatting crap). In some cases minor other changes have been done to keep the code working, instead of converting between types (e.g. an explicit comparison operator implementation for nix::Pid). Change-Id: I12e1ca51a6bc2c882dba81a2526b9729d26988e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1832 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi> </content>
</entry>
<entry>
<title>refactor(3p/nix): Anchor local includes at src/</title>
<updated>2020-05-27T20:56:34+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-27T20:56:34+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=3652326ed281f5f753423acef51103fb8df62a6d"/>
<id>urn:sha1:3652326ed281f5f753423acef51103fb8df62a6d</id>
<content type="text"> Previously all includes were anchored in one global mess of header files. This moves the includes into filesystem "namespaces" (if you will) for each sub-package of Nix. Note: This commit does not introduce the relevant build system changes. </content>
</entry>
<entry>
<title>refactor(3p/nix): Apply clang-tidy's performance-* fixes</title>
<updated>2020-05-20T21:58:43+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-20T21:58:43+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=43677021e3c285c2ced2075b918da947e13fcb00"/>
<id>urn:sha1:43677021e3c285c2ced2075b918da947e13fcb00</id>
<content type="text"> This applies the performance fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html </content>
</entry>
<entry>
<title>refactor(3p/nix): Apply clang-tidy's readability-* fixes</title>
<updated>2020-05-20T21:27:37+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-20T21:27:37+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=689ef502f5b0655c9923ed77da2ae3504630f473"/>
<id>urn:sha1:689ef502f5b0655c9923ed77da2ae3504630f473</id>
<content type="text"> This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html </content>
</entry>
<entry>
<title>refactor(3p/nix): Apply clang-tidy's modernize-* fixes</title>
<updated>2020-05-20T03:33:07+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-20T03:33:07+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=d331d3a0b5c497a46e2636f308234be66566c04c"/>
<id>urn:sha1:d331d3a0b5c497a46e2636f308234be66566c04c</id>
<content type="text"> This applies the modernization fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html The 'modernize-use-trailing-return-type' fix was excluded due to my personal preference (more specifically, I think the 'auto' keyword is misleading in that position). </content>
</entry>
<entry>
<title>refactor(3p/nix): Make all single-argument constructors explicit</title>
<updated>2020-05-19T21:02:23+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-19T21:02:23+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=88f337588c9f1a41ac67b3afb8d43f124b4d153b"/>
<id>urn:sha1:88f337588c9f1a41ac67b3afb8d43f124b4d153b</id>
<content type="text"> Implicit constructors can be confusing, especially in a codebase that is already as unintentionally obfuscated as this one. https://google.github.io/styleguide/cppguide.html#Explicit_Constructors </content>
</entry>
<entry>
<title>style(3p/nix): Final act in the brace-wrapping saga</title>
<updated>2020-05-19T19:51:32+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-19T19:47:23+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=39087321811e81e26a1a47d6967df1088dcf0e95"/>
<id>urn:sha1:39087321811e81e26a1a47d6967df1088dcf0e95</id>
<content type="text"> This last change set was generated by a full clang-tidy run (including compilation): clang-tidy -p ~/projects/nix-build/ \ -checks=-*,readability-braces-around-statements -fix src/*/*.cc Actually running clang-tidy requires some massaging to make it play nice with Nix + meson, I'll be adding a wrapper or something for that soon. </content>
</entry>
<entry>
<title>style(3p/nix): Add braces around single-line for-loops</title>
<updated>2020-05-19T18:04:08+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-19T18:04:08+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=1841d93ccbe5792a17f5b9a22e65ec898c7c2668"/>
<id>urn:sha1:1841d93ccbe5792a17f5b9a22e65ec898c7c2668</id>
<content type="text"> These were not caught by the previous clang-tidy invocation, but were instead sorted out using amber[0] as such: ambr --regex 'for (\(.+\))\s([a-z].*;)' 'for $1 { $2 }' [0]: https://github.com/dalance/amber </content>
</entry>
<entry>
<title>style(3p/nix): Add braces around single-line conditionals</title>
<updated>2020-05-19T17:55:58+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-19T17:55:58+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=867055133d3f487e52dd44149f76347c2c28bf10"/>
<id>urn:sha1:867055133d3f487e52dd44149f76347c2c28bf10</id>
<content type="text"> These were not caught by the previous clang-tidy invocation, but were instead sorted out using amber[0] as such: ambr --regex 'if (\(.+\))\s([a-z].*;)' 'if $1 { $2 }' [0]: https://github.com/dalance/amber </content>
</entry>
<entry>
<title>style(3p/nix): Reformat all includes to match new style</title>
<updated>2020-05-19T14:55:11+00:00</updated>
<author>
<name>Vincent Ambo</name>
<email>tazjin@google.com</email>
</author>
<published>2020-05-19T14:54:39+00:00</published>
<link rel="alternate" type="text/html" href="http://code.tvl.fyi/commit/?id=c758de9d22506eb279c5abe61f621e5c8f61af95"/>
<id>urn:sha1:c758de9d22506eb279c5abe61f621e5c8f61af95</id>
<content type="text"> </content>
</entry>
</feed>