-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
straight is rebuilding org on every single launch of emacs #624
Comments
Try running the following test case twice. Test Case(straight-bug-report
:user-dir "org-rebuild-test.straight"
:preserve t
:post-bootstrap
(straight-use-package 'org))
OutputBootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Test run with version: prerelease (HEAD -> develop, origin/develop) 68dade0 2020-10-24
Cloning org...
Cloning org...done
Building org...
Building org...done
Output<2>Test run with version: prerelease (HEAD -> develop, origin/develop) 68dade0 2020-10-24
|
Thanks a lot for the pointers! I'm unsure if you meant to run within an existing emacs or a fresh
and nothing else happens. OTOH if you meant with |
Sorry, I should have been clearer. |
If you're not seeing anything after a reasonable amount of time, you can add to the test to make it an interactive emacs process:
You can also check to see if |
@progfolio commented on November 2, 2020 7:37 PM:
That's what I did. It just outputs the message above in the minibuffer and nothing else happens... Ahah, eventually I saw this in the minibuffer:
It happened so much later (minutes later) that I didn't realise it was related. But running it again showed the connection. After enabling Debugger entered--Lisp error: (void-variable interactive)
(if interactive nil (unless raw (straight-bug-report--format report)) (switch-to-buffer-other-window straight-bug-report--process-buffer))
(unless interactive (unless raw (straight-bug-report--format report)) (switch-to-buffer-other-window straight-bug-report--process-buffer))
(lambda (_process _event) (unless interactive (unless raw (straight-bug-report--format report)) (switch-to-buffer-other-window straight-bug-report--process-buffer)) (unless preserve-files (when (file-exists-p temp-emacs-dir) (delete-directory temp-emacs-dir 'recursive))))(#<process *straight-bug-report-process*> "finished\n") |
Sounds like you may be executing it without lexical binding enabled. I patched this last night so that you'll get a more informative, immediate, user-error in this case. Try evaling in a buffer which has lexical-binding enabled. |
Ahah yes! Works now, many thanks :-) Yes, on second run it doesn't rebuild org. So does that mean the issue is specific to my environment? If so, what's the next step - my original suggestion of digging deeper in |
Yes, that's my inclination. Test case runs for me without subsequent rebuilds. Some other useful info to have:
|
Thanks a lot - super busy at the moment but I'll get back to this soon! |
@rileyrg please try running the test case here in a buffer with lexical binding enabled: Any other relevant info, such as your org use-package declaration and the values I mentioned here: will be helpful as well. |
@aspiers I noticed you are using use-package's This could cause a conflict w straight since |
Nice idea but it doesn't help. However @rileyrg's screenshot above made me wonder why I was seeing This suggests to me that maybe this issue is related to the way I'm loading |
Hrm, I changed some stuff and now both builds are taking a long time ... :-/ If I have (use-package org
:straight org-plus-contrib
...) does that mean that I should be referencing (use-package orgit
:after (org-plus-contrib magit)) |
@progfolio commented on November 2, 2020 10:06 PM:
The default:
`(org :type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :build ,(let ((make (if (eq system-type 'berkeley-unix) "gmake" "make")) (emacs (concat "EMACS=" invocation-directory invocation-name))) `(,make "oldorg" ,emacs)))
`(org-plus-contrib :type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :files (:defaults "contrib/lisp/*.el") :build ,(let ((make (if (eq system-type 'berkeley-unix) "gmake" "make")) (emacs (concat "EMACS=" invocation-directory invocation-name))) `(,make "oldorg" ,emacs)))
("2020-11-08 11:21:04" nil (:type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :files (:defaults "contrib/lisp/*.el") :build ("make" "oldorg" "EMACS=/usr/bin/emacs") :package "org-plus-contrib")) |
@aspiers commented on November 8, 2020 11:19 AM:
Oh wow, I changed all of these from |
I guess there are two remaining questions:
|
I'm also having constant issues with boxquote.el btw. Keeps saying can't
run git. I'm only on my mobile atm so just consider this as a "you're not
alone" support. The strangest thing to me re org-contrib is that C-x C-e on
the use-package builds it and then it's not rebuilt on subsequent restarts
as we'd hope.
…On Sun, 8 Nov 2020, 12:44 Adam Spiers ***@***.***> wrote:
***@***.**** <https://github.com/progfolio> commented on November 2, 2020
10:06 PM
<#624 (comment)>
:
Some other useful info to have:
- value of straight-check-for-modifications
The default: (find-at-startup find-when-checking)
- recipe for Org in your init file and recipe for Org as returned by
straight-get-recipe.
org or org-plus-contrib? In any case, here they both are:
`(org :type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :build ,(let ((make (if (eq system-type 'berkeley-unix) "gmake" "make")) (emacs (concat "EMACS=" invocation-directory invocation-name))) `(,make "oldorg" ,emacs)))
`(org-plus-contrib :type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :files (:defaults "contrib/lisp/*.el") :build ,(let ((make (if (eq system-type 'berkeley-unix) "gmake" "make")) (emacs (concat "EMACS=" invocation-directory invocation-name))) `(,make "oldorg" ,emacs)))
- output of (gethash "org-plus-contrib" straight--build-cache) (or
"org" if you're not using "org-plus-contrib")
("2020-11-08 11:21:04" nil (:type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :files (:defaults "contrib/lisp/*.el") :build ("make" "oldorg" "EMACS=/usr/bin/emacs") :package "org-plus-contrib"))
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#624 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYTC6R3CLGSQB7PF34JMDSO2ACTANCNFSM4TGXVASQ>
.
|
This issue describes the problem where it is rebuilt, undesirably, on subsequent restarts. Are you saying you want the opposite behaviour? It's not supposed to rebuild unless something changes which requires the rebuild. |
I am saying that it was constantly rebuilding up to when I started emacs again, watched it rebuild org-plus-contrib yet again, opened my config file and manually eval'ed the org use-package form. Then, when I quit and restarted emacs it didn't rebuild. Strange eh? But it might trigger an "aha" in someone who knows this stuff better than me. |
FYI, I have to give up now because of other things today, but I did a complete straight wipe out and restarted emacs. I had to comment out the boxquote.el form.
When I tried to evaluate it after here is the stack. I've a nasty feeling this is going to be something to do with the recipe format but I've no idea. All the other GitHub hosted repos clone just fine.
|
That error simply means the |
The clone works fine converting to
git clone https://github.com/davep/boxquote.el
indicating it's something (recent) with my ssh/gnupg agent in this case.
I'll change the recipe. The only one in the hundred or so packages I use :(
…On Sun, 8 Nov 2020, 14:31 Adam Spiers ***@***.***> wrote:
That error simply means the git clone failed, which could be down to a
broken internet connection or some other misconfiguration of your git
setup. I suggest manually trying the git clone command listed in the
error to see if it's even related to emacs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#624 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYTC2LNSAQD26CNLUNXOTSO2MT3ANCNFSM4TGXVASQ>
.
|
I just did a clean start ensuring emacs was opening my key properly for ssh-agent. the git@github boxquote.el clone still failed from inside emacs. I'm removing it now so I can get on. Sorry I cant provide more info atm. |
@rileyrg: I get the git failure as well. The error being thrown points to the
It appears boxquote.el's default branch is now "main": https://github.com/davep/boxquote.el either of these should fix the problem while we wait for #543 to land: (straight-use-package '(boxquote :branch "main")) or (use-package boxquote
:straight (:branch "main")) |
@aspiers: Thank you for taking the time to look into this more and for #628. Glad to see you were able to resolve the issue. I agree we could do better by providing more specific configuration examples in the docs for popular packages like Org. If you have ideas, please let us know. I think the changes planned for Org 9.5 (#620) may help alleviate some of this confusion. |
Looks like you have a plan of action on this @progfolio, sharing an additional test case below in case it's helpful. Also it seems like some people have resolved when testing with Not sure what the cause is but thought it might be an explanation why the problem seems to go away when testing. Test Case(straight-bug-report
:user-dir "org-contrib-rebuild-test.straight"
:preserve t
:post-bootstrap
(straight-use-package 'use-package)
(use-package org :straight
(org-plus-contrib :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :files
(:defaults "contrib/lisp/*.el")))
(use-package org-super-agenda :straight t :after org))
First Run OutputBootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Test run with version: prerelease (HEAD -> develop, origin/develop) 949a0a7 2020-12-13
Cloning use-package...
Cloning use-package...done
Building use-package...
Building use-package → Building bind-key...
Building use-package → Building bind-key...done
Building use-package...
Building use-package...done
Cloning org (for org-plus-contrib)...
Cloning org (for org-plus-contrib)...done
Building org-plus-contrib...
Building org-plus-contrib...done
Cloning org-super-agenda...
Cloning org-super-agenda...done
Building org-super-agenda...
Building org-super-agenda → Cloning s.el...
Building org-super-agenda → Cloning s.el...done
Building org-super-agenda → Building s...
Building org-super-agenda → Building s...done
Building org-super-agenda → Cloning dash.el...
Building org-super-agenda → Cloning dash.el...done
Building org-super-agenda → Building dash...
Building org-super-agenda → Building dash...done
Building org-super-agenda → Building org...
Building org-super-agenda → Building org...done
Building org-super-agenda → Cloning ht.el...
Building org-super-agenda → Cloning ht.el...done
Building org-super-agenda → Building ht...
Building org-super-agenda → Building ht...done
Building org-super-agenda → Cloning ts.el...
Building org-super-agenda → Cloning ts.el...done
Building org-super-agenda → Building ts...
Building org-super-agenda → Building ts...done
Building org-super-agenda...
Building org-super-agenda...done
Second Run OutputTest run with version: prerelease (HEAD -> develop, origin/develop) 949a0a7 2020-12-13
Building org-plus-contrib...
Building org-plus-contrib...done
Building org...
Building org...done
|
Org's makefile takes care of this work. Doing it twice is not only wasteful, but can cause errors (see: radian-software#624)
Org's makefile takes care of this work. Doing it twice is not only wasteful, but can cause errors (see: radian-software#624) Use "org" as build-dir name for org-plus-contrib Otherwise we end up with both build/org-plus-contrib and build/org when a package declares Org as a dependency after the user has installed org-plus-contrib.
Org's makefile takes care of this work. Doing it twice is not only wasteful, but can cause errors (see: radian-software#624) Use "org" as build-dir name for org-plus-contrib Otherwise we end up with both build/org-plus-contrib and build/org when a package declares Org as a dependency after the user has installed org-plus-contrib.
Separates byte-compilation from state of running Emacs. See: radian-software#76, radian-software#624
Separates byte-compilation from state of running Emacs. See: radian-software#76, radian-software#624
Org's `oldorg` make target duplicates straight's byte-compilation and autoload generation. This duplicaiton is wasteful and error-prone (see: radian-software#624) We're going with Org's `autoloads` make target because it generates the necessary org-version.el file as well as autoloads. Straight handles the byte-compilation. Use "org" as build-dir name for org-plus-contrib Otherwise we end up with both build/org-plus-contrib and build/org when a package declares Org as a dependency after the user has installed org-plus-contrib.
Org's `oldorg` make target duplicates straight's byte-compilation and autoload generation. This duplicaiton is wasteful and error-prone (see: #624) We're going with Org's `autoloads` make target because it generates the necessary org-version.el file as well as autoloads. Straight handles the byte-compilation. Use "org" as build-dir name for org-plus-contrib Otherwise we end up with both build/org-plus-contrib and build/org when a package declares Org as a dependency after the user has installed org-plus-contrib.
The latest develop branch is byte compiling in a separate process and has the altered Org mode recipes. |
This appears to work for me. I had to update my custom org-plus-contrib recipe to use the new built-in one, which appears to work well. Thank you! |
I'll gladly test later. What's the recommended use-package/straight-use
form for this now?
…On Sat, 2 Jan 2021 at 07:54, Aaron Jensen ***@***.***> wrote:
This appears to work for me. I had to update my custom org-plus-contrib
recipe to use the new built-in one, which appears to work well. Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#624 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYTC2OEXBNFVV6OWKHP2TSX27MBANCNFSM4TGXVASQ>
.
|
straight.el's built-in recipes for Org have been improved to avoid duplication. No need to mention org at all, just org-plus-contrib: radian-software/straight.el#658 radian-software/straight.el#624 (comment)
I just switched to |
but org-plus-contrib takes care of loading org? What a minefield. I've kind
of given up trying to understand it;)
…On Sat, 2 Jan 2021 at 12:14, Adam Spiers ***@***.***> wrote:
I just switched to (use-package org-plus-contrib) and other packages to :after
org-plus-contrib and it seems to work fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#624 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYTCZRXSPEUNRMBGZPKODSX353BANCNFSM4TGXVASQ>
.
|
If you look at the latest source, you'll see that straight.el translates both |
I've no idea what that means or the consequences. I'll just use-package
org-plus-contrib and see how it goes. Many thanks.
…On Sat, 2 Jan 2021, 14:22 Adam Spiers, ***@***.***> wrote:
If you look at the latest source, you'll see that straight.el translates
both org and org-plus-contrib into recipes which start with (org ...) and
both have "lisp/*.el" in their :files property, but only org-plus-contrib
also has "contrib/lisp/*.el" in its :files property.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#624 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYTC7O33ZK5KBVUMLK2P3SX4MZVANCNFSM4TGXVASQ>
.
|
Thank you everyone for you patience and testing efforts. @reilyrg: I understand the confusion around Org vs "Org plus contrib". In Org 9.5, the plan (as I understand it) is to break out the |
Thank goodness. org-plus-contrib is quite frankly bizarre. Unfortunately, in the absence of some upstream packaging changes, I do not think it is possible to smooth over the unintuitive behavior in @progfolio One thing I notice with the new recipes is that it is now possible for |
I don't know if it's something particular to my setup, but I still frequently have to rebuild org. |
I tracked this down. Because I launch Emacs on a mac in different ways, Instead, I hardcoded the recipe with
|
Maybe those variables should be evaluated at build time, rather than at recipe expansion time? I can't think of a good reason we'd want to rebuild Org just because a different path to Emacs is used. Perhaps if it's a different Emacs version, but in that case the build cache will be invalidated anyway. |
Agreed. I'll look into it. |
What's wrong
I am now seeing a
Building org...
message from straight.el every single time I launch emacs. Presumably this is related to the recent addition of support for:build
steps. Since the build steps do things like compiling the whole manual, this takes something like one or two minutes and therefore drastically increases the waiting time before emacs is ready for use.Directions to reproduce
I've added some debug to the bit of
straight-use-package
which calculatesmodified
and it is showing that(straight--package-might-be-modified-p recipe no-build)
returns98
, so presumably it's something in there which is going wrong.But if you can't reproduce this and it's looking like this might be related to some peculiarity of my config, given that I have a decent amount of elisp hacking experience, rather than trying to create a minimal test case I guess it might be quicker if you can confirm I'm on the right track and I'll keep digging in
straight--package-might-be-modified-p
.Version information
master
ofstraight.el
The text was updated successfully, but these errors were encountered: