unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Progress on merging Eglot?
@ 2022-09-08 12:31 Payas Relekar
  2022-09-08 13:09 ` João Távora
  0 siblings, 1 reply; 42+ messages in thread
From: Payas Relekar @ 2022-09-08 12:31 UTC (permalink / raw)
  To: emacs-devel; +Cc: joaotavora


Hi,

I remember reading a discussion on possibly merging Eglot (language
server client) to Emacs core. I also distinctly remember author wished
to hack on it in the core after merging.

Since it is already on ELPA, are there any more blockers to merge it?

We have a tree-sitter branch, perhaps we can also have one for Eglot?

cc Joao Tavora (Eglot author/maintainer)

Thanks,
Payas Relekar

--



^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Progress on merging Eglot?
@ 2022-09-08 16:48 Payas Relekar
  2022-09-08 17:09 ` João Távora
  0 siblings, 1 reply; 42+ messages in thread
From: Payas Relekar @ 2022-09-08 16:48 UTC (permalink / raw)
  To: emacs-devel

João Távora <joaotavora@gmail.com> writes:

> [Sorry, I took part of this conversation off-list by mistake.  Bringing it
> back.]
>
> Cool, I'll put you down for item 2 then!  I recommend the tool
> https://github.com/newren/git-filter-repo.  Here's an example of how it's
> used.
>
> https://stackoverflow.com/questions/60863773/git-bulk-change-of-commit-dates
>
> This tool seems to be preferred over `git filter-branch` nowadays and is
> easy to
> combine with whatever scripting language you're comfortable with.
>
> I've used one of the two in the past (can't remember which).  There are
> others, so choose your poison. I also vaguely  remember that running the
> script on windows was about a million times slower than on a GNU/linux
> box.
> Also not sure if that holds anymore.
>
> So the inputs should be Eglot's main repo (master branch) and some branch
> of the emacs.git repo.  The output should be something like a new
> lisp/progmodes/eglot.el added and then some 900+ commits on top of it.
> Place this on a git branch somewhere so we can look at it.
>
> We'll probably need to make adjustments, so make sure to post the script
> somewhere with instructions on how to use it.

Thanks a ton for pointers! I think I got most of it down, if any more
questions, will reach back out.

One thing I'm thinking is, is there any possibility of PRs being
referred in commit messages? If so, the */issues/num won't work, and
*/pulls/num will have to be used. That means probably involving curl.

This looks fun :)

--
Payas
--



^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Progress on merging Eglot?
@ 2022-09-18 16:55 Payas Relekar
  0 siblings, 0 replies; 42+ messages in thread
From: Payas Relekar @ 2022-09-18 16:55 UTC (permalink / raw)
  To: emacs-devel

Payas Relekar <relekarpayas@gmail.com> writes:

A convenient gist for the steps, for those who'd like it that way:
https://gist.github.com/bhankas/422c34db2e987d4dc3f243e26ba156a3

Thanks,
Payas

> Hello,
>
> A bit later than I expected, but $LIFE and all..
>
> I made a naive attempt to get eglot.el into emacs with history (took too
> long to call it QnD, but its definitely dirty).
>
> Here's the steps I followed:
>
> ***
> # move to a directory where both repos can be cloned
> cd ~/git
>
> # clone repos
> git clone https://github.com/joaotavora/eglot.git
>
> git clone git clone -b master git://git.sv.gnu.org/emacs.git
>
> # filter eglot with only eglot.el and find+replace # in commit messages
> git filter-repo --path eglot.el --message-callback '
>       return re.sub(b" #", b" https://github.com/joaotavora/eglot/issues/", message)
>       return re.sub(b",#", b",https://github.com/joaotavora/eglot/issues/", message)
>       return re.sub(b"(#", b"(https://github.com/joaotavora/eglot/issues/", message)
>       return re.sub(b"Fix#", b"Fix: https://github.com/joaotavora/eglot/issues/", message)
>       return re.sub(b"github#", b"Github: https://github.com/joaotavora/eglot/issues/", message)
>       '
>
> # back to emacs repo
> cd ../emacs
>
> # add filtered eglot as upstream
> git remote add eglot ../eglot/
>
> git fetch eglot master
>
> # prepare emacs repo for merge
> git merge remotes/eglot/master --allow-unrelated-histories --no-commit
>
> # reset eglot to initial commit
> cd ../eglot && git reset --hard 4970e7e1b605510c665c52bc1ddd83bcd1e255d4
>
> # merge by pushing eglot.el into lisp/progmodes/
> cd ../emacs && git read-tree --prefix=lisp/progmodes/ -u eglot/master
>
> # make a commit
> git commit -m "; Merge from joaotavora/eglot"
>
> # push eglot to latest
> cd ../eglot && git reset --hard 2f9cf0dcfb2d37f45ec8b9ea65ac9063da033b70
>
> # pull all eglot history to emacs
> cd ../emacs && git pull -s subtree eglot master
> --allow-unrelated-histories
> ***
>
> This is the repo I pushed for you to see:
> https://github.com/bhankas/emacs/commits/master
>
> There are couple of glaring issues with this:
>
> 1. commit message length is not validated, but can be part of 'git filter-repo' script
> 2. history does not show for eglot.el or lisp/progmodes, but only as part
>   of entire emacs repo
>
> I'm kinda unsure where to go from here, for #1 I can definitely use some
> help, my bash skills are primitive at best.
>
> As for #2, I've tried quite a few solutions after scouring Google  and
> this seems to be the least bad. Another approach was to export patches
> from our filtered eglot repo and apply them to particular file in emacs
> repo, but that way leads to many many merge conflicts, that I am unsure
> how to resolve automatically. I'll be happy to provide the patches to
> anybody if it can help.
>
> Further help appreciated.
>
> Thanks,
> Payas
>
> Payas Relekar <relekarpayas@gmail.com> writes:
>
>> João Távora <joaotavora@gmail.com> writes:
>> I'd say focus just on keeping the history of eglot.el.  The history of
>>> eglot-tests.el would
>>> be nice too, but nowhere as important as eglot.el.
>>>
>>> Don't worry about the other files.
>>>
>>> João
>>
>> Very well. Thank you!
>>
>> Will get back once there is some progress.
>
> --
>
>

--



^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Progress on merging Eglot?
@ 2022-09-19 13:11 Payas Relekar
  2022-09-19 14:28 ` João Távora
  0 siblings, 1 reply; 42+ messages in thread
From: Payas Relekar @ 2022-09-19 13:11 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Payas Relekar [2022-09-19 10:12:34] wrote:
>> Another way I can think of is to keep #nums where they are right now,
>> but add their respective links in the message body below.
>
> I was about to say that the overlong lines are perfectly fine (the main
> focus is to preserve information, rather than make it pretty), but this
> is even better.
>

Thanks. I think the script is generic enough that it can be run second
time with minor changes to have the tests file too. That can maybe help
with #3 on Joao's list (adjusting tests).

#1 seems trivial enough (:core ELPA package) and #5 (emacs core ->
 github sync for eglot.el) is low/non priority, so I am looking at #4.

#4 being checking/verifying copyright assignments. Joao mentioned some
 are copyright exempt, and I wouldn't know where to start.

Any pointers on that? Probably only one of Emacs maintainers can verify
assignments, but anything you need on the way? List of author names
and/or emails?

Thanks,
Payas
--



^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Progress on merging Eglot?
@ 2022-09-19 15:12 Payas Relekar
  2022-09-19 16:09 ` João Távora
  0 siblings, 1 reply; 42+ messages in thread
From: Payas Relekar @ 2022-09-19 15:12 UTC (permalink / raw)
  To: emacs-devel

João Távora <joaotavora@gmail.com> writes:

> The only problem is that I can't get run the full eglot2emacs.sh to run.
> The process is blocked, I think, by an Emacs commit hook that refuses to
> accept some trailing changes in some unrelated files.  Can you see
> what's up with that?  Did I mess up eglot2emacs.sh?
>

I'll probably won't be able to test again today, but from what I see
your .sh is pretty much identical to mine.

.py is well beyond my kindergarten python, but if I had to make a guess
its probably generating something that Emacs doesn't like. My script did
not add any newlines to commit messages, and yours does, but there's
enough stuff I don't know about git/python/bash to make any conclusive
statement.

Thanks,
Payas

--



^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: Progress on merging Eglot?
@ 2022-09-19 16:32 Payas Relekar
  2022-09-19 16:59 ` João Távora
  0 siblings, 1 reply; 42+ messages in thread
From: Payas Relekar @ 2022-09-19 16:32 UTC (permalink / raw)
  To: emacs-devel

João Távora <joaotavora@gmail.com> writes:

> On Mon, Sep 19, 2022 at 4:52 PM Payas Relekar <relekarpayas@gmail.com>
> wrote:
>
>> .py is well beyond my kindergarten python, but if I had to make a guess
>> its probably generating something that Emacs doesn't like.
>>
>
> No, that wasn't it.  It probably worked for you because your script clones
> a fresh
> emacs.git repo without installing the pre-commit hooks.  When they are in
> place,
> the merge is prevented.  I haven't investigated why: there is some logic in
> ~/.git/hooks/pre-commit that supposedly nullifies the hook for merges.

Possible, every time I made changes to script, I had emacs repo hard
reset to upstream master. Maybe try that first?

> Anyway, when the hook is laid to rest, the result is something like what I
> just uploaded to the scratch/eglot2emacs branch:
>
> This branch will probably be deleted and re-created frequently as we tweak
> the script.
> I hope that isn't a problem.  Stefan?

Excellente! And away we go....

Payas

--



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

end of thread, other threads:[~2022-09-19 16:59 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 12:31 Progress on merging Eglot? Payas Relekar
2022-09-08 13:09 ` João Távora
2022-09-08 13:55   ` Philip Kaludercic
2022-09-08 14:02     ` João Távora
2022-09-08 14:14       ` Philip Kaludercic
2022-09-08 14:24         ` Payas Relekar
2022-09-08 14:44           ` Philip Kaludercic
2022-09-08 14:47             ` João Távora
2022-09-08 14:54               ` Payas Relekar
     [not found]           ` <CALDnm50tiazUMnm9D3knBUCSLbT4FLvSPoX4ayUEmOtQSHbCtw@mail.gmail.com>
     [not found]             ` <87r10lor2c.fsf@gmail.com>
2022-09-08 16:08               ` João Távora
2022-09-08 14:26         ` João Távora
  -- strict thread matches above, loose matches on Subject: below --
2022-09-08 16:48 Payas Relekar
2022-09-08 17:09 ` João Távora
2022-09-08 17:09   ` Payas Relekar
2022-09-08 17:16     ` João Távora
2022-09-08 17:26       ` Payas Relekar
2022-09-18 16:31         ` Payas Relekar
2022-09-18 20:30           ` Philip Kaludercic
2022-09-18 20:47             ` Dmitry Gutov
2022-09-18 21:00               ` Philip Kaludercic
2022-09-18 21:11                 ` Dmitry Gutov
2022-09-18 21:13                   ` João Távora
2022-09-18 21:12                 ` João Távora
2022-09-18 21:20                   ` Philip Kaludercic
2022-09-18 21:24                     ` João Távora
2022-09-19  2:37           ` Stefan Monnier
2022-09-19  4:25             ` Payas Relekar
2022-09-19  4:42               ` Payas Relekar
2022-09-19  7:23                 ` João Távora
2022-09-19  9:09                   ` Payas Relekar
2022-09-19  9:25                     ` Payas Relekar
2022-09-19  9:17                   ` Payas Relekar
2022-09-19 14:09                     ` João Távora
2022-09-19 12:25                 ` Stefan Monnier
2022-09-18 16:55 Payas Relekar
2022-09-19 13:11 Payas Relekar
2022-09-19 14:28 ` João Távora
2022-09-19 15:50   ` Payas Relekar
2022-09-19 15:12 Payas Relekar
2022-09-19 16:09 ` João Távora
2022-09-19 16:32 Payas Relekar
2022-09-19 16:59 ` João Távora

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).