emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switching to new Git repositories


From: Kyle Meyer
Subject: Re: Switching to new Git repositories
Date: Thu, 23 Sep 2021 18:24:19 -0400

On 09/23/21 17:17:48 -0400, No Wayman wrote:
>> Sounds like a weird issue.  I don't think this 9.5-dev tag is 
>> something from the Org repo.
>
> There is a bug in mk/targets.mk introduced by 61336f80dc.

Quoting that commit message for context:

  mk/targets.mk: Add version fallback for tag-less repos
  
  * mk/targets.mk (ORGVERSION, GITVERSION): Get version from lisp/org.el
  header if it can't be retrieved from git-describe.
  
  As of elpa.git's ee03829f90 (Finalize the new master branch,
  2020-12-14), org-release and org-git-version are empty strings in
  https://elpa.gnu.org/packages/org-*.tar files.  This is because the
  new setup executes `make autoloads info' in an elpa.git worktree with
  an Org branch checked out, but elpa.git of course doesn't have Org's
  release tags.
  
  Maintaining the org.el version header has been a point of contention
  in the past [1], but the header has been there for a while now.  Use
  it to avoid the above elpa.git issue.  In the case of the master
  branch, the org-release value generated in a tag-less repo will have a
  different version than the one from a regular repo because org.el's
  version header has a "-dev" suffix, but that's still better than an
  empty version.
  [...]

> As others have pointed out, the new repository does not have tags.
> As a fallback, org.el's version is read in it's header.
> However, it looks like Kyle forgot to trim that string so we get 
> ORGVERSION set to "9.5-dev" instead of "9.5".

I of course can't say for sure, but based on my commit message (in
particular the last paragraph), it sounds like I was aware of the
discrepancy but didn't realize it'd cause the downstream "Invalid
version syntax" issue mentioned by Bill in
<alpine.DEB.2.22.394.2109231400490.7770@shell3.miskatonic.org>.

> This causes `org-version' to return an incorrect version string.
>
> The attached patch addresses the issue in the makefile.

Thanks.

> Subject: [PATCH] mk/targets.mk: Fix ORGVERSION in tag-less repos
>
> * mk/targets.mk (ORGVERSION, GITVERSION): properly generate ORGVERSION.

I think it'd be better to say something more specific about the change
rather than say "properly" and assume the reader knows what the writer
has in mind.

> Fix bug introduced 61336f80 which caused ORGVERSION to be generated as
> "Major.Minor-dev" instead of "Major.Minor" in tag-less repos.

Please say what the bug is.  Can you give a sparse outline of the call
chain for the error mentioned in Bill's message?

> -    ORGVERSION := $(shell $(BATCH) --eval "(require 'lisp-mnt)" \
> -      --visit lisp/org.el --eval '(princ (lm-header "version"))')
> -    GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD)
> +    ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 
> 'lisp-mnt)" \
> +      --visit lisp/org.el --eval '(princ (lm-header "version"))'))
> +    GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD))

It looks like you've unintentionally added a ')' to the end of the
GITVERSION line.

Another approach would be to update org.el's version to contain
something that still signals "-dev" but won't trigger the "Invalid
version syntax" (which, based on grepping the Emacs repo, is signaled by
version-to-list).  But given that in the current setup a clone with tags
wouldn't use the header version, stripping -dev for consistency sounds
like the way to go.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]