Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5A93C200B47 for ; Sun, 3 Jul 2016 06:40:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 58E85160A5F; Sun, 3 Jul 2016 04:40:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9F62B160A5D for ; Sun, 3 Jul 2016 06:40:50 +0200 (CEST) Received: (qmail 77625 invoked by uid 500); 3 Jul 2016 04:40:49 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Received: (qmail 77613 invoked by uid 99); 3 Jul 2016 04:40:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2016 04:40:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 77847C0403 for ; Sun, 3 Jul 2016 04:40:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.228 X-Spam-Level: X-Spam-Status: No, score=-2.228 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=me.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id drttyDIwU5Qp for ; Sun, 3 Jul 2016 04:40:46 +0000 (UTC) Received: from pv33p04im-asmtp002.me.com (pv33p04im-asmtp002.me.com [17.143.181.11]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id BB7305F47D for ; Sun, 3 Jul 2016 04:40:45 +0000 (UTC) Received: from process-dkim-sign-daemon.pv33p04im-asmtp002.me.com by pv33p04im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0O9Q00H0024F2S00@pv33p04im-asmtp002.me.com> for dev@trafficserver.apache.org; Sun, 03 Jul 2016 04:40:28 +0000 (GMT) Received: from [10.0.0.34] (c-24-23-136-16.hsd1.ca.comcast.net [24.23.136.16]) by pv33p04im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0O9Q00KCL2BE6620@pv33p04im-asmtp002.me.com>; Sun, 03 Jul 2016 04:40:27 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-03_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1607030051 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: RFC: self-contained headers From: James Peach In-reply-to: <1784317483.2525971.1467504688404.JavaMail.yahoo@mail.yahoo.com> Date: Sat, 02 Jul 2016 21:40:26 -0700 Content-transfer-encoding: quoted-printable Message-id: <5B130F1B-CC9B-4A79-A9B7-D1940DF2F485@me.com> References: <79ABA682-CB30-4786-B6C8-394D2229FE4B@apache.org> <6CBF1E89-8425-49B5-8A4D-BC7C599B85B0@apache.org> <1784317483.2525971.1467504688404.JavaMail.yahoo@mail.yahoo.com> To: dev@trafficserver.apache.org, Alan Carroll X-Mailer: Apple Mail (2.3124) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1467520828; bh=Xy4vNxs2VbC09MPO6dn1WirmREFpEqvVBNv3G6eUwsM=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=JSskpjZnVPtvUj8sIofhgjIGXvJoLT/FS4gC88MkUZrvCX4qrV5sNE1MUGUcPL20H 5Ow05TPN1SIGcJq1ZrOkN+1wseLf7oF3BX8ZmZ/GDvaqdQ70GAaUXpbrdu16GyP2It Bs6fSrDkixoxyS9cWTEuYAITnD9GtRdi/s9W4J2ExYXI//OnpQP8P3+58IAHa/L4Ul 4+S1KXShkx8O7EdOKHoV214/0wuCtzkeyDLdeph+XVDCroC+/z4r96L+pEMQhBI5Db TRriIGEaV8HgRDacOdsIsqp0qF7I+YQWwEV4DhEe8JPnkjgufaMma4aOMkhNth9Xdl SFLs8SQ4PopXg== archived-at: Sun, 03 Jul 2016 04:40:51 -0000 > On Jul 2, 2016, at 5:11 PM, Alan Carroll = wrote: >=20 > Yes, it's unclear to me what "self contained" means. Obviously we = can't have exactly one header file for Traffic Server, so include must = be allowed. What property of the current header file structure doesn't = include sufficiently to make clang-tidy happy?=20 By self-contained I mean that each header #includes all the others that = it depends on. For example, if you have to #include a bunch of other = headers in your .cc before you include foo.h, then foo.h is not = self-contained. It would be self-contained if it #included everything = that it needed. One specific example. I_Lock.h is not self contained because it = doesn=E2=80=99t #include the headers needed for RefCountObj, Ptr and a = bunch of other stuff. To make clang-tidy changes to a header file, you = would do this: /opt/clang/bin/clang-tidy -fix -fix-errors I_Lock.h -- c++ = -DHAVE_CONFIG_H -I. -I../../lib -I../../lib -I../../lib/records = -Ddarwin -DDEBUG -D_DEBUG -D_LARGEFILE64_SOURCE=3D1 = -D_COMPILE64BIT_SOURCE=3D1 -D_GNU_SOURCE -D_REENTRANT = -D__STDC_LIMIT_MACROS=3D1 -D__STDC_FORMAT_MACROS=3D1 = -I/usr/local/Cellar/openssl/1.0.2h_1/include -DOPENSSL_NO_SSL_INTERN = -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers = -I/usr/local/include -I/usr/local/Cellar/pcre/8.39/include -O0 = -std=3Dc++11 -g -pipe -Wall -Wno-deprecated-declarations = -Qunused-arguments -Werror -Wno-invalid-offsetof -mcx16 -x c++ Note that the header itself is passes to clang-tidy, so for the code in = the header to be valid in this context, clang-tidy needs to see all the = prerequisites. J=