unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages
       [not found] ` <20200511214135.F14AF20A23@vcs0.savannah.gnu.org>
@ 2020-05-11 21:54   ` Dmitry Gutov
  2020-05-11 22:12     ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2020-05-11 21:54 UTC (permalink / raw)
  To: emacs-devel, João Távora

On 12.05.2020 00:41, Jo�o T�vora wrote:
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index f5f4092..6be1500 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1,6 +1,11 @@
>   ;;; project.el --- Operations on the current project  -*- lexical-binding: t; -*-
>   
>   ;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
> +;; Version: 1.0.0

Please make this one "0.1".



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages
  2020-05-11 21:54   ` scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages Dmitry Gutov
@ 2020-05-11 22:12     ` João Távora
  2020-05-11 22:21       ` Dmitry Gutov
  2020-05-11 23:17       ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: João Távora @ 2020-05-11 22:12 UTC (permalink / raw)
  To: Dmitry Gutov, monnier; +Cc: emacs-devel

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 12.05.2020 00:41, Jo�o T�vora wrote:
>> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
>> index f5f4092..6be1500 100644
>> --- a/lisp/progmodes/project.el
>> +++ b/lisp/progmodes/project.el
>> @@ -1,6 +1,11 @@
>>   ;;; project.el --- Operations on the current project  -*- lexical-binding: t; -*-
>>     ;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
>> +;; Version: 1.0.0
>
> Please make this one "0.1".

No problem, I guess, but sure you don't want "Semantic Versioning"
stuff?  Also, why only that one ? Any reason why I shouldn't _also_ use
0.1 for eldoc.el and xref.el?

Regardless, I have two serious-ish problems here:

1. xref and project.el have a cyclic dependency.  xref.el depends
  (properly) on project.el but it seems project.el also depends on
  xref.el.


     (defun project--files-in-directory (dir ignores &optional files)
       (require 'find-dired)
       (require 'xref)
       (defvar find-name-arg)


   How should I fix this? Any ideas? Or should I be creative?

2. It'd be nice if both xref.el and project.el were available for Emacs
   26.3.  But project.el in Emacs master depends on fileloop.el, which
   in turn depends on generator.el. OK? Should I make both fileloop.el
   and generator.el :core packages, too?

   Or should I bite the bullet and let them stay on 27.1.  In that case,
   Eglot will soon start requiring Emacs 27.1 only, but I wouldn't mind
   giving some support to Eglot on 26.3.

João

   



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages
  2020-05-11 22:12     ` João Távora
@ 2020-05-11 22:21       ` Dmitry Gutov
  2020-05-11 22:36         ` João Távora
  2020-05-11 23:17       ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2020-05-11 22:21 UTC (permalink / raw)
  To: João Távora, monnier; +Cc: emacs-devel

On 12.05.2020 01:12, João Távora wrote:
> Dmitry Gutov <dgutov@yandex.ru> writes:
> 
>> On 12.05.2020 00:41, Jo�o T�vora wrote:
>>> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
>>> index f5f4092..6be1500 100644
>>> --- a/lisp/progmodes/project.el
>>> +++ b/lisp/progmodes/project.el
>>> @@ -1,6 +1,11 @@
>>>    ;;; project.el --- Operations on the current project  -*- lexical-binding: t; -*-
>>>      ;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
>>> +;; Version: 1.0.0
>>
>> Please make this one "0.1".
> 
> No problem, I guess, but sure you don't want "Semantic Versioning"
> stuff?

I think we should indicate its current pre-release status somehow.

> Also, why only that one ? Any reason why I shouldn't _also_ use
> 0.1 for eldoc.el and xref.el?

They seem more stable.

> Regardless, I have two serious-ish problems here:
> 
> 1. xref and project.el have a cyclic dependency.  xref.el depends
>    (properly) on project.el but it seems project.el also depends on
>    xref.el.
> 
> 
>       (defun project--files-in-directory (dir ignores &optional files)
>         (require 'find-dired)
>         (require 'xref)
>         (defvar find-name-arg)
> 
> 
>     How should I fix this? Any ideas? Or should I be creative?

Are cyclic dependencies a problem for package.el? I'm not sure.

> 2. It'd be nice if both xref.el and project.el were available for Emacs
>     26.3.  But project.el in Emacs master depends on fileloop.el, which
>     in turn depends on generator.el. OK? Should I make both fileloop.el
>     and generator.el :core packages, too?

fileloop is new, but generator.el has been there since Emacs 25, IIUC.

fileloop could also be an optional dependency, considering it's only 
required by a couple of commands.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages
  2020-05-11 22:21       ` Dmitry Gutov
@ 2020-05-11 22:36         ` João Távora
  0 siblings, 0 replies; 6+ messages in thread
From: João Távora @ 2020-05-11 22:36 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: monnier, emacs-devel

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 12.05.2020 01:12, João Távora wrote:
>> Dmitry Gutov <dgutov@yandex.ru> writes:
>> 
>>> On 12.05.2020 00:41, Jo�o T�vora wrote:
>>>> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
>>>> index f5f4092..6be1500 100644
>>>> --- a/lisp/progmodes/project.el
>>>> +++ b/lisp/progmodes/project.el
>>>> @@ -1,6 +1,11 @@
>>>>    ;;; project.el --- Operations on the current project  -*- lexical-binding: t; -*-
>>>>      ;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
>>>> +;; Version: 1.0.0
>>>
>>> Please make this one "0.1".
>> No problem, I guess, but sure you don't want "Semantic Versioning"
>> stuff?
>
> I think we should indicate its current pre-release status somehow.

Sounds fair.

>> Also, why only that one ? Any reason why I shouldn't _also_ use
>> 0.1 for eldoc.el and xref.el?

OK

>> Regardless, I have two serious-ish problems here:
>> 1. xref and project.el have a cyclic dependency.  xref.el depends
>>    (properly) on project.el but it seems project.el also depends on
>>    xref.el.
>> 
>>       (defun project--files-in-directory (dir ignores &optional files)
>>         (require 'find-dired)
>>         (require 'xref)
>>         (defvar find-name-arg)
>> 
>>     How should I fix this? Any ideas? Or should I be creative?

No idea either.  I think it shouldn't be too bad, since the potential
loads happen at runtime.  Stefan?

>> 2. It'd be nice if both xref.el and project.el were available for Emacs
>>     26.3.  But project.el in Emacs master depends on fileloop.el, which
>>     in turn depends on generator.el. OK? Should I make both fileloop.el
>>     and generator.el :core packages, too?
>
> fileloop is new, but generator.el has been there since Emacs 25, IIUC.

Unfortunately fileloop.el requires a generator.el variable that is not
in the generator.el of Emacs 26.3, iter-empty.

> fileloop could also be an optional dependency, considering it's only
> required by a couple of commands.

Works for me!  But then the comment up there should read:

   ;;; project.el --- Operations on the current project  -*- lexical-binding: t; -*-
   ...
   ;; Package-Requires: ((emacs "26.3"))
    
   ;; This is a GNU ELPA :core package.  Don't use functionality that is
   ;; not compatible with the version of Emacs recorded above, or avoid
   ;; that such functionality is compiled by default in that version.

Which would make this a question of an eval-when-compile + some version
check.  Unfortunately, the two definitions

   ;;;###autoload
   (defun project-search (regexp)

   ;;;###autoload
   (defun project-query-replace-regexp (from to)

Are autoloaded, as you can see.  Maybe I can just make the definitions
fail.

João





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages
  2020-05-11 22:12     ` João Távora
  2020-05-11 22:21       ` Dmitry Gutov
@ 2020-05-11 23:17       ` Stefan Monnier
  2020-05-11 23:25         ` Dmitry Gutov
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2020-05-11 23:17 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel, Dmitry Gutov

> 1. xref and project.el have a cyclic dependency.  xref.el depends
>   (properly) on project.el but it seems project.el also depends on
>   xref.el.
>
>      (defun project--files-in-directory (dir ignores &optional files)
>        (require 'find-dired)
>        (require 'xref)
>        (defvar find-name-arg)
>
>    How should I fix this? Any ideas? Or should I be creative?

IIUC a significant part of project's functionality works fine without
xref, so you could consider that project does not Package-Require
`xref`.

Also it's worth checking if it depend on a *recent* version of xref, or
if it also work with the xref that comes with Emacs-26 or even Emacs-25.

Another option is to bundle them into a single package (`:core` packages
can be composed of several files, see `soap-client` for an example).

> 2. It'd be nice if both xref.el and project.el were available for Emacs
>    26.3.  But project.el in Emacs master depends on fileloop.el,

This dependency is of no real importance: it's only used to provide the
two commands `project-search` and `project-query-replace-regexp` for
which there are many alternatives anyway.  So I wouldn't worry about it.
We could simply change the code to test (fboundp
'fileloop-initialize-replace) and signal a cleaner error (mentioning
that these commands only work in Emacs≥27) than "void-function".


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages
  2020-05-11 23:17       ` Stefan Monnier
@ 2020-05-11 23:25         ` Dmitry Gutov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2020-05-11 23:25 UTC (permalink / raw)
  To: Stefan Monnier, João Távora; +Cc: emacs-devel

On 12.05.2020 02:17, Stefan Monnier wrote:
> IIUC a significant part of project's functionality works fine without
> xref, so you could consider that project does not Package-Require
> `xref`.

I don't know if that's true: project--files-in-directory is used a lot. 
For example, in the default impl of project-files (used to "transient" 
projects, as well as arbitrary user-defined projects that don't create 
their own implementation).

xref.el could be used without project.el, though (only the default 
xref-backend-references impl uses it, that code is old, and we could 
even make a point not to change it much in the future).



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-11 23:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200511214134.32634.30981@vcs0.savannah.gnu.org>
     [not found] ` <20200511214135.F14AF20A23@vcs0.savannah.gnu.org>
2020-05-11 21:54   ` scratch/eldoc-xref-project-gnu-elpa-core-packages b1631cd: Turn Eldoc, Xref and Project into GNU ELPA :core packages Dmitry Gutov
2020-05-11 22:12     ` João Távora
2020-05-11 22:21       ` Dmitry Gutov
2020-05-11 22:36         ` João Távora
2020-05-11 23:17       ` Stefan Monnier
2020-05-11 23:25         ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).