Skip to content
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

Byte-compile packages in child Emacs process #76

Closed
raxod502 opened this issue Jul 13, 2017 · 6 comments
Closed

Byte-compile packages in child Emacs process #76

raxod502 opened this issue Jul 13, 2017 · 6 comments

Comments

@raxod502
Copy link
Member

Otherwise, the compilation is affected nondeterministically by the state of the running Emacs. Hasn't bit me yet, but I know it will someday.

@slippycheeze
Copy link

Forgive the drive-by comment, but the async package provides this facility natively. Might save you time and trouble to reuse that feature.

@cyruseuros
Copy link

Just leaving this here for how the async package @slippycheeze mentioned does it:
https://github.com/jwiegley/emacs-async/blob/master/async-bytecomp.el#L137

@thierryvolpiatto
Copy link

Yes async package provide async-byte-recompile-directory that you can use safely instead of
byte-recompile-directory, this will avoid bugs when packages rename macros, variables etc...
We are using this with Helm since long time now, Magit use this too.

@raxod502
Copy link
Member Author

Hasn't bit me yet, but I know it will someday.

Looks like "someday" turned out to be a little over three years: #624 (comment)

Eh, could have been worse---I'll take it.

@thierryvolpiatto
Copy link

thierryvolpiatto commented Dec 22, 2020 via email

progfolio added a commit to progfolio/straight.el that referenced this issue Dec 23, 2020
Separates byte-compilation from state of running Emacs.

See: radian-software#76, radian-software#624
progfolio added a commit to progfolio/straight.el that referenced this issue Dec 23, 2020
Separates byte-compilation from state of running Emacs.

See: radian-software#76, radian-software#624
@raxod502
Copy link
Member Author

You are correct in that the specific package.el problem that you describe does not also happen with straight.el, unless you use straight-rebuild-package. However, there are other issues. One is that byte-compiling a package causes it to be loaded. This means that in some inits, a package will be eagerly loaded, while in others, it won't be. This is bad for reproducibility, because sometimes a package being eagerly loaded can either surface or hide a bug. Another issue relates to a complex tangle of Org things, which is described in #624 (comment) as I mentioned earlier.

progfolio added a commit that referenced this issue Dec 31, 2020
* Byte compile in child process

Separates byte-compilation from state of running Emacs.

See: #76, #624

Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants