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 22:20:12 +0300 Message-ID: References: <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 1446060066 18032 80.91.229.3 (28 Oct 2015 19:21:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2015 19:21:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 28 20:20:50 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 1ZrWHA-00077b-Ol for ged-emacs-devel@m.gmane.org; Wed, 28 Oct 2015 20:20:49 +0100 Original-Received: from localhost ([::1]:40337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWH5-0006bp-63 for ged-emacs-devel@m.gmane.org; Wed, 28 Oct 2015 15:20:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWGg-0006ZD-U8 for emacs-devel@gnu.org; Wed, 28 Oct 2015 15:20:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrWGd-0008DT-NX for emacs-devel@gnu.org; Wed, 28 Oct 2015 15:20:18 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:39359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrWGd-0008DE-Ff for emacs-devel@gnu.org; Wed, 28 Oct 2015 15:20:15 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 9834D2061D for ; Wed, 28 Oct 2015 15:20:14 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Wed, 28 Oct 2015 15:20:14 -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=3wMtC wf3brDmncY/j7e56Hlncdk=; b=fWChZvp0tJATedjBMhpG4Xd2KwY/mtH1bOlCZ guJrSt3AXk0VwFgBkOLGFKKC9VEKRQZ/DM4JIU2twGsYbqtXIGFPeROrgzoDZ9UN QEsIkjj7aUW4DHnd44cLcoWSVDclGtN6k9EkCLsHT2u4jopd58kgmg5Yfex3PJWo lQQPSk= 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=3wMtCwf3brDmncY/j7e56Hlncdk=; b=myx5p lTxjlRI7W9Ne+SN7hpvnMSGAyeEP751EzJ8g9FIl/EMltV3Pn3OMhy5c0GQNlELd kF7JLmI8IYm/RRa8r6+Ppj/OhxkLRCKXWaVzuMETarIN+pPKdctWKvv7r1qVerUO IRWzPz39/nn2rYHmElYEE2BlVyHGEw+i7A88a4= X-Sasl-enc: 5t/N9x6lzbQVuSl1fh2VL/QFUrJyZ41qyvW2QP1UkfwW 1446060014 Original-Received: from fgunbin.local (unknown [94.25.218.10]) by mail.messagingengine.com (Postfix) with ESMTPA id F301768015E for ; Wed, 28 Oct 2015 15:20:13 -0400 (EDT) In-Reply-To: (Steinar Bang's message of "Wed, 28 Oct 2015 16:57:16 +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.28 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:192815 Archived-At: On 28/10/2015 16:57 +0100, Steinar Bang wrote: >>>>>> Filipp Gunbin : >> This is done only once given that pom.xml doesn't change (and if it >> changes this is repeated). > > Have you given any thoughts to triggering this when the pom.xml is saved > and/or changed on disk? When a set of completions is prepared for an interactive command (like `javaimp-add-import'), pom files' timestamps are checked and if they changed then the information stored by the package is updated. This works only for current and one parent pom up the hierarchy for now, for others it's better to do `javaimp-forget-all-visited-modules' manually. The same is done for jar files: when a jar file classes are added to a set of completion alternatives, its timestamp is checked - useful because often we work with SNAPSHOT versions of the current module's siblings and wish to read the latest information from them. Current module's classes are added by scanning current source directory, this is rather dumb scanning - no code parsing, just file names. javaimp does not support importing of inner classes, but usually for me it's not a problem because it's enough to import the top class in a file. >> 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). > > Do you cache this only in memory or on disk? (sounds like might be a > good idea to cache this information in an S-expression file, eg. pom.el, > toghether with each pom.xml and maintain the pom.el in a make-like > fashion...?) Currently only in memory, but I'm thinking of doing a "flush" to a file. My workflow is like that: when I "open" a project, I call `javaimp-maven-visit-root' on a top-level project and it loads information on it and its child projects (mvn help:effective-pom). When I call `javaimp-add-import' from one of the projects' files, it recognizes which module needs to be scanned and invokes Maven on that module (mvn dependency:build-classpath AFAIR), then scans jars which require scanning and suggests completion alternatives. So it's all on demand (have to wait a bit during the first time, though). This is to eliminate constant indexing / scanning / updating which I hated in Idea/Eclipse. Filipp