From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.devel Subject: Re: IDE Date: Wed, 28 Oct 2015 15:34:06 +0300 Message-ID: References: <561DC1CA.6090901@siege-engine.com> <561E3FB6.8010407@yandex.ru> <561EEFDE.7000809@gmail.com> <561F29D0.3070605@yandex.ru> <561FA79C.30207@gmail.com> <56200D07.30206@yandex.ru> <5620A99E.7080009@cumego.com> <5620D109.2010006@yandex.ru> <5620DCCD.8030809@cumego.com> <87y4f2u5ef.fsf@fimbulvetr.bsc.es> <5621C701.5030608@yandex.ru> <87d1wdo1la.fsf@fimbulvetr.bsc.es> <5622D5A5.80801@yandex.ru> <87fv18hwau.fsf@fimbulvetr.bsc.es> <562410AD.2020204@yandex.ru> <87mvvff1qy.fsf@fimbulvetr.bsc.es> <56258EC6.7090706@yandex.ru> <5626E513.4000106@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446035694 10241 80.91.229.3 (28 Oct 2015 12:34:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2015 12:34:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 28 13:34:39 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZrPw4-00029G-NS for ged-emacs-devel@m.gmane.org; Wed, 28 Oct 2015 13:34:37 +0100 Original-Received: from localhost ([::1]:37676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrPw4-0002pP-79 for ged-emacs-devel@m.gmane.org; Wed, 28 Oct 2015 08:34:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrPvj-0002li-VZ for emacs-devel@gnu.org; Wed, 28 Oct 2015 08:34:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrPvf-0007Vo-Tz for emacs-devel@gnu.org; Wed, 28 Oct 2015 08:34:15 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrPvf-0007RW-NP for emacs-devel@gnu.org; Wed, 28 Oct 2015 08:34:11 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9BDDD20246 for ; Wed, 28 Oct 2015 08:34:08 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 28 Oct 2015 08:34:08 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=5nTH2 yV4TxjEoqHtDZn2rMzw62I=; b=fF0ByDXiZrYPGlK4C1O+sZ9NJ2NIMPhndOs8Z qDS1oNdby4BnGAOCQVxudrudiH4RsL5KJ4H+3yp6PEBIUum2qFtlcgJDgeTTym2t P0UzmlwmfTOmyUkcR4CsDPO5UJdkc6/aH9DKQGWqGrXY/Cexv/OEHlGZxmzZKUdY pm7ak0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=5nTH2yV4TxjEoqHtDZn2rMzw62I=; b=gwhBT KozM3pndIu5JZk8rBgaTsyY43/gllBu+ho8x0NKN9eXeI58Agedno59Xij2Fddh0 Wa4TkU4ERiDqzxjc1W9+hUJR4BqGNJE+AI2qdQi4ajhvUr4k5ls8omeYGbvV/vxv EoGsf+7HRpolxbp4Mc2XUNBNXxjz0VfntWkwcU= X-Sasl-enc: ZTYR6DX5Q9SPeCT2ar6va0IflCZo+7ElxusiRvSPDWHz 1446035648 Original-Received: from fgunbin.local (unknown [94.25.218.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 0E4866801CF for ; Wed, 28 Oct 2015 08:34:07 -0400 (EDT) In-Reply-To: (Steinar Bang's message of "Tue, 27 Oct 2015 18:28:26 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192785 Archived-At: On 27/10/2015 18:28 +0100, Steinar Bang wrote: >>>>>> Dmitry Gutov : > >> Could we consider it to be constant value across the whole project, or >> would we have, for certain operations (like "find the class named >> foo.bar.Bar"), different values of classpath in module1 and module2? > > The classpath will be per project/module, and for each project it can > differ for compilation, runtime, test execution. > > A *brief* explanation of how the class path is built (for the initiated: > by "identity" below, I mean the "maven coordinates" consisting of > groupId/artifactId/version): > - Each pom.xml file, have: > - an identity > - the identity of a parent pom.xml file > - a list of dependencies (including the scope of the dependency, > eg. "test") > - The combined dependency list of a pom.xml is: > - The dependencies in the dependency list > - The transitive dependencies of the dependencies in the dependency > list > - The combined dependencies of the parent pom.xml (which includes that > pom.xml file's dependencies and transitive dependencies and those of > its parent in turn) > - Maven will download all dependencies and install them in the maven > local cache (by default the maven local cache resides in > $HOME/.m2/repository/ ) > - Maven will create the appropriate classpath for compile, test, run, > etc. consisting of jar files in the maven local cache > I've been following this long thread with interest and there's one thing that keeps bothering me - should we duplicate the logic of build tool in Emacs IDE-like features? In my `javaimp' package (available in GNU Elpa) Emacs calls Maven to get classpath, then scans all jars in it (it takes them from local Maven cache and reads what classes are inside). This is done only once given that pom.xml doesn't change (and if it changes this is repeated). This requires some time to wait for Maven to finish and output the classpath. But jar scanning is inevitable, I guess, and takes more time (both are cached then). I'm hoping to implement something like this for Gradle, but I didn't get to it yet and I don't know whether it can output classpath like Maven can. Btw, there are subtleties between different Maven versions in dealing with dependency merging when what is called an `effective pom' is built (that is, when pom hierarchy is merged to produce effective settings for the current module). I remember that initially Maven 3 was outputting a slightly wrong tree with `mvn dependency:tree' rather than it was actually using during build. This looks a lot like the GCC AST problem. Filipp