unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally
@ 2020-12-20 20:31 Jonas Bernoulli
  2020-12-20 23:31 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Jonas Bernoulli @ 2020-12-20 20:31 UTC (permalink / raw)
  To: 45345; +Cc: Stefan Monnier

> - Another advantage is that the new code makes it much easier to build
>   your own tarballs, for example to test them before pushing to code.
>   You can just do `make build/[PKGNAME]` and the resulting package will
>   be built in `archive/[PKGNAME]-[VERSION].tar.

That almost worked. "make build/<package>" (or `elpaa--make-one-package')
calls `elpaa--external-package-sync', which pulls.  That of course is not
desirable when one wants to test some other revision of the package than
what would end up being pulled.





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

* bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally
  2020-12-20 20:31 bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally Jonas Bernoulli
@ 2020-12-20 23:31 ` Stefan Monnier
  2020-12-21 10:47   ` Jonas Bernoulli
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2020-12-20 23:31 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: 45345

>> - Another advantage is that the new code makes it much easier to build
>>   your own tarballs, for example to test them before pushing to code.
>>   You can just do `make build/[PKGNAME]` and the resulting package will
>>   be built in `archive/[PKGNAME]-[VERSION].tar.
> That almost worked. "make build/<package>" (or `elpaa--make-one-package')
> calls `elpaa--external-package-sync', which pulls.  That of course is not
> desirable when one wants to test some other revision of the package than
> what would end up being pulled.

Could you give some detail about the situation in which doing `git pull`
was a problem for you?

I mean, obviously I could just move that call to
`elpaa--external-package-sync` elsewhere, but `elpaa--make-one-package'
is supposed to make packages from *commits* (it normally makes two
packages, one from the head of the branch and another from the last
commit that changed `Version:` line) so it "inherently" moves between
different commits.


        Stefan






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

* bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally
  2020-12-20 23:31 ` Stefan Monnier
@ 2020-12-21 10:47   ` Jonas Bernoulli
  2020-12-21 14:33     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Jonas Bernoulli @ 2020-12-21 10:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 45345

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

>>> - Another advantage is that the new code makes it much easier to build
>>>   your own tarballs, for example to test them before pushing to code.
>>>   You can just do `make build/[PKGNAME]` and the resulting package will
>>>   be built in `archive/[PKGNAME]-[VERSION].tar.
>> That almost worked. "make build/<package>" (or `elpaa--make-one-package')
>> calls `elpaa--external-package-sync', which pulls.  That of course is not
>> desirable when one wants to test some other revision of the package than
>> what would end up being pulled.
>
> Could you give some detail about the situation in which doing `git pull`
> was a problem for you?

I was making some experimental changes.  In this case the changes where
to transient's internal tools responsible for updating version numbers
in the manual.  These tools are broken when used in a worktree of the
elpa repository because they relay in git tags, which do not exist here.

I did not want to push any of these very temporary experiments to the
public transient repository, just so elpa-archive could pull them from
there.

IMO its irrelevant what experiments I was running.  There will always
be things people will want to try out before making them public.

> I mean, obviously I could just move that call to
> `elpaa--external-package-sync` elsewhere, but `elpaa--make-one-package'
> is supposed to make packages from *commits* (it normally makes two
> packages, one from the head of the branch and another from the last
> commit that changed `Version:` line) so it "inherently" moves between
> different commits.

I dealt with that by creating a temporary dummy commit.  I also bumped
the Package-Version to some temporary fantasy number in that same
commit.  None of that I want to push to some public location just so I
can test locally.

     Jonas





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

* bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally
  2020-12-21 10:47   ` Jonas Bernoulli
@ 2020-12-21 14:33     ` Stefan Monnier
  2020-12-21 17:26       ` Jonas Bernoulli
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2020-12-21 14:33 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: 45345

> I was making some experimental changes.  In this case the changes where
> to transient's internal tools responsible for updating version numbers
> in the manual.  These tools are broken when used in a worktree of the
> elpa repository because they relay in git tags, which do not exist here.
>
> I did not want to push any of these very temporary experiments to the
> public transient repository, just so elpa-archive could pull them from
> there.

There's definitely no need to affect remote repositories.

Assuming you're using the "normal" setup where `packages/transient` is
a worktree, `elpaa--external-package-sync` won't actually fetch anything
from the remote server and will just do `git merge` which will
presumably do nothing at all unless you've `git fetched` something into
`origin/externals/transient` since the last sync or you manually moved
the `externals/transient` branch back to some earlier commit.

So, I think your diagnostic pointing at `elpaa--external-package-sync`
was a red herring and the problem is rather that:

>> `elpaa--make-one-package'
>> is supposed to make packages from *commits*

whereas you wanted to make a tarball from whatever was currently in
`packages/transient`, including uncommitted changes.  Is that right?

IOW the function that got in the way of your goal wasn't
`elpaa--external-package-sync` but `elpaa--clean`.

I think the solution will be to make a new kind of make target which
just builds one tarball and skips `elpaa--clean` (and will also skip
`elpaa--external-package-sync` while we're at it).


        Stefan






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

* bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally
  2020-12-21 14:33     ` Stefan Monnier
@ 2020-12-21 17:26       ` Jonas Bernoulli
  2020-12-22  3:27         ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Jonas Bernoulli @ 2020-12-21 17:26 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 45345

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

> `elpaa--external-package-sync` won't actually fetch anything
> from the remote server and will just do `git merge` which will
> presumably do nothing at all unless you've `git fetched` something into
> `origin/externals/transient` since the last sync or you manually moved
> the `externals/transient` branch back to some earlier commit.

Now that you mention it, yes I did move back to some earlier commit.
I just tried with some new local-only commits and without rewinding
first and that indeed worked just fine.

I don't expect to rewind history going forward so this likely won't
cause me any issues anymore.  (I had to rewind because I had not yet
discarded the special "for-gnu-elpa" branch that moved the library to
the top-level.  In this case I did have to "rewrite history", but I
don't plan to do that again.)

> So, I think your diagnostic pointing at `elpaa--external-package-sync`
> was a red herring and the problem is rather that:
>
>>> `elpaa--make-one-package'
>>> is supposed to make packages from *commits*
>
> whereas you wanted to make a tarball from whatever was currently in
> `packages/transient`, including uncommitted changes.  Is that right?

No, I did in fact create a commit named "[WIP]".

> IOW the function that got in the way of your goal wasn't
> `elpaa--external-package-sync` but `elpaa--clean`.

Had I not created a commit, then yes, that would have been a problem,
but apparently I anticipated this complication. ;)

> I think the solution will be to make a new kind of make target which
> just builds one tarball and skips `elpaa--clean` (and will also skip
> `elpaa--external-package-sync` while we're at it).

Something like "make archive/<package>"
and "make archive-devel/<package>"?
That might be useful.

     Jonas





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

* bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally
  2020-12-21 17:26       ` Jonas Bernoulli
@ 2020-12-22  3:27         ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2020-12-22  3:27 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: 45345

> Something like "make archive/<package>"
> and "make archive-devel/<package>"?
> That might be useful.

I pushed a patch such that you can now do

    make [PKGNAME].tar

and it will just (re)build that one tarball with whichever revision is
currently in `packages/[PKGNAME]`.


        Stefan






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

end of thread, other threads:[~2020-12-22  3:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 20:31 bug#45345: [elpa-archive] "make build/<package>" should not pull unconditionally Jonas Bernoulli
2020-12-20 23:31 ` Stefan Monnier
2020-12-21 10:47   ` Jonas Bernoulli
2020-12-21 14:33     ` Stefan Monnier
2020-12-21 17:26       ` Jonas Bernoulli
2020-12-22  3:27         ` Stefan Monnier

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