From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: guillaume papin Newsgroups: gmane.emacs.devel Subject: Re: New Flymake rewrite in emacs-26 Date: Wed, 11 Oct 2017 18:39:31 +0000 Message-ID: References: <8760bwz5qf.fsf@gmail.com> <83infw1dkz.fsf@gnu.org> <87efqbb35x.fsf@gmail.com> <831smbqe70.fsf@gnu.org> <87tvz79h0s.fsf@gmail.com> <83wp43ov7s.fsf@gnu.org> <87bmlf9dh3.fsf@gmail.com> <83tvz7ot1o.fsf@gnu.org> <87y3oj7x60.fsf@gmail.com> <87a80y8s3s.fsf@gmail.com> <831smaoubw.fsf@gnu.org> <87y3oh7v16.fsf@gmail.com> <87k2017qed.fsf@gmail.com>, <43bcb3a1-118e-73fb-17d9-c32a74b829e3@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507747234 18240 195.159.176.226 (11 Oct 2017 18:40:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2017 18:40:34 +0000 (UTC) Cc: "npostavs@users.sourceforge.net" , "lele@metapensiero.it" , "mvoteiza@udel.edu" , "monnier@iro.umontreal.ca" , Eli Zaretskii , "sdl.web@gmail.com" To: Romanos Skiadas , =?iso-8859-1?Q?Jo=E3o_T=E1vora?= , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 11 20:40:28 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2LvX-0002iO-2v for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2017 20:40:19 +0200 Original-Received: from localhost ([::1]:42191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2Lvc-0004YY-RS for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2017 14:40:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2Luw-0004YT-BU for emacs-devel@gnu.org; Wed, 11 Oct 2017 14:39:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2Luv-0003q9-78 for emacs-devel@gnu.org; Wed, 11 Oct 2017 14:39:42 -0400 Original-Received: from mail-db5eur01on0111.outbound.protection.outlook.com ([104.47.2.111]:24416 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e2Lur-0003o2-Ik; Wed, 11 Oct 2017 14:39:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epitechfr.onmicrosoft.com; s=selector1-epitech-eu; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Yx90FQvMOBAPW6qTkES97NAmfWdSvUWzNXAEG/ufqhM=; b=LkfKmY8w/lfAk5RvsD8eD5yW9yXJP5PYvInAEXlCmmSILAp0O7t6U9YxW60MXZV0fsdEDu5GCsaGeaPFw5XZp/wCllQPnpjhCo+/BhH2QbMM9xkvbjn/UBUglMRk9yOFymFPl1KIgy857fEDvzIHPDW+tzLrGrrH13Kueo5yszg= Original-Received: from HE1PR02MB1195.eurprd02.prod.outlook.com (10.163.173.153) by HE1PR02MB1193.eurprd02.prod.outlook.com (10.163.173.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 18:39:31 +0000 Original-Received: from HE1PR02MB1195.eurprd02.prod.outlook.com ([fe80::74fa:43af:e662:826a]) by HE1PR02MB1195.eurprd02.prod.outlook.com ([fe80::74fa:43af:e662:826a%13]) with mapi id 15.20.0077.020; Wed, 11 Oct 2017 18:39:31 +0000 Thread-Topic: New Flymake rewrite in emacs-26 Thread-Index: AQHTPFDglktedSpUfU6j3Z9YjOIEc6LSOEBXgArU+aWAAB+iIoAADiBMgAAMdACAAAk0VYAABAURgAAGK52AAASzgIAAcc7egACsljCAABsHUYAAHASJgABE2QCAAAYXiA== In-Reply-To: <43bcb3a1-118e-73fb-17d9-c32a74b829e3@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=guillaume.papin@epitech.eu; x-originating-ip: [85.68.71.246] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR02MB1193; 6:h7/4YZz3nrij9GMtS+ZoYEumWjoIi/ktMAfW4QryCJoeOKY0EofJkgNCZR51L2R9w08B9PpQ7rvJrvdFAVVtPI3/Y7FWhYIKEjngYeHQdjff9vr4zVJ5yFebtbC0ktjWJ8rlIIEV1EV5tJyLub3hOsgJaVVl0lq3yPG87juJz4F+zs6+LHq7jEddY6NEW1eGeu6YFKF4AKMWvt+frs2PtN6eBTX1RhDQ54Shg8K/e12uQwD1btN27vO8J7w8KMCM2x/Kme8giOxJPh+Qg2Wb3X9tKIiUFySRYOyykPd0LbnAmDGu2H8GEc22LroZhzwGt6h6ohC/4F4etPHBVa6LlA==; 5:8u7DMu1olQ+ZkxvaIEE+4TDtG7i+1rSWZEk9QczExAxyWBjEDZwAdYf9l+8IHOkLlD+FXv1tC7FQJ74Llasuml48A+X4dnHMEiKMJw/W5vraJiEkguwqEzUogny98PPV6QUQKcSDrXsxMDnRECaMhw==; 24:QAHQ2S1vdsxLrBmxjKix+Zo7pBnNeJ2j1T1w8XNlRRegiAitRC0veOkIredlVaX84qcDcvcZ009DzgJSYNT/VwxeoniFaX/SShIct7fRWJc=; 7:lUgYB5uU8igEXO6/xpZ6zWKWBMs+7vTOJ9zWsXLp1f5fQ2BOCPGm/hHF5dAnuLxOo7e1bN4zwSsrTiIbHyyJUADeOaH/6hKg+/3nQ7DSLKJyaFW1gfx/uJPld+tsahA6qGtsoMYoCbbpIJlbJPltLnW8vHa9h6HXuODBbwRGeMiWr1I9ix/0tTMwF0SqUxmvc2jYLA1WI+PbaZOqbiY94JRA5+/B3EVdY x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: b4dad195-5f93-4f50-a270-08d510d76949 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:HE1PR02MB1193; x-ms-traffictypediagnostic: HE1PR02MB1193: x-exchange-antispam-report-test: UriScan:(166708455590820)(262104967686372); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123560025)(20161123558100)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR02MB1193; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR02MB1193; x-forefront-prvs: 0457F11EAF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(6009001)(376002)(346002)(199003)(288314003)(189002)(7736002)(3280700002)(189998001)(54906003)(25786009)(305945005)(5250100002)(7696004)(14454004)(86152003)(99286003)(2900100001)(55016002)(6506006)(8676002)(74482002)(2906002)(110136005)(9686003)(81166006)(478600001)(6306002)(76176999)(54356999)(68736007)(101416001)(2950100002)(81156014)(50986999)(966005)(6436002)(8936002)(5660300001)(3660700001)(86362001)(53936002)(229853002)(316002)(97736004)(6246003)(786003)(74316002)(33656002)(106356001)(4326008)(3846002)(2501003)(6116002)(39060400002)(66066001)(105586002)(102836003)(93886005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR02MB1193; H:HE1PR02MB1195.eurprd02.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: epitech.eu does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM X-OriginatorOrg: epitech.eu X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2017 18:39:31.0895 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 901cb4ca-b862-4029-9306-e5cd0f6d9f86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR02MB1193 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.111 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219384 Archived-At: Regarding the way for a project to export it compile options, there is somewhat popular, if not standard, method. Generate a compilation database[1]. A compilation database is a JSON file, named compile_commands.json, with looks like this for emacs: [ { "arguments": [ "cc", "-c", "-Demacs", "-I.", "-I../../emacs/src", "-I../lib", "-I../../emacs/lib", "-pthread", "-isystem", "/usr/include/gtk-3.0", "-isystem", "/usr/include/libpng16", "-fopenmp", "-DMAGICKCORE_HDRI_ENABLE=3D1", "-DMAGICKCORE_QUANTUM_DEPTH=3D16", "-fopenmp", "-DMAGICKCORE_HDRI_ENABLE=3D1", "-DMAGICKCORE_QUANTUM_DEPTH=3D16", "-Wno-unused-parameter", "-Wno-format-nonliteral", "-g3", "-O2", "../../emacs/src/intervals.c" ], "directory": "/home/papin_g/dev/src/emacs/emacs-25.1-build/src"= , "file": "../../emacs/src/intervals.c" }, ] I could generate this with a tool called intercept-build[2], by doing a clean build of emacs: $ intercept-build make ... CC dbusbind.o CC emacs.o CC keyboard.o ... $ cat compile_commands.json [ { "arguments": [ "cc", "-c", ... The compile options have the `-M' filtered out by the tool. I think there is something in CEDET that knows how to load this information= for emacs, see ede-compdb[2], but this is also quite straightforward to do with the `j= son' libray. What the Emacs makefile could do, is generate the JSON file with a command = like `make compdb'. I have done this in the past for project using GNU Make, it wasn't too diff= icult to implement. This is also what the cmake-ide tool mentionned just before seems to be usi= ng. [1] https://clang.llvm.org/docs/JSONCompilationDatabase.html Sorry for the link to Clang, it's not really Clang-specific. [2] https://github.com/rizsotto/scan-build Once again, related to Clang, sorry about that. Bear is basically the same thing, and maybe easier to install from sour= ce: https://github.com/rizsotto/Bear [3] https://github.com/randomphrase/ede-compdb This is a Github link, but it says that this has been integrated into C= EDET.=