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

Require 'om fails #462

Closed
ndw opened this issue Jan 17, 2020 · 3 comments
Closed

Require 'om fails #462

ndw opened this issue Jan 17, 2020 · 3 comments
Labels

Comments

@ndw
Copy link

@ndw ndw commented Jan 17, 2020

This is possibly related to #451 but I can't tell. It's also possibly user error.

What's wrong

A package that uses defconst inside eval-when-compile seems not to be loaded
correctly.

Directions to reproduce

I load om with:

(straight-use-package
 '(om :type git :host github :repo "ndwarshuis/om.el"))

If, after straight has downloaded and compiled om, I restart Emacs and (require 'om), I get:

Debugger entered--Lisp error: (void-variable om-elements)
  (-intersection om-branch-nodes-permitting-child-objects om-elements)
  (defconst om-branch-elements-permitting-child-objects (-intersection om-branch-nodes-permitting-child-objects om-elements) ("/Users/ndw/.emacs.d/straight/build/om/om.elc" . 741))
  require(om)
  eval((require (quote om)) nil)
  elisp--eval-last-sexp(t)
  eval-last-sexp(t)
  eval-print-last-sexp(nil)
  funcall-interactively(eval-print-last-sexp nil)
  call-interactively(eval-print-last-sexp nil nil)
  command-execute(eval-print-last-sexp)

Version information

  • Emacs version: 26.3
  • Operating system: MacOS
@ndw ndw added the bug label Jan 17, 2020
@raxod502

This comment has been minimized.

Copy link
Owner

@raxod502 raxod502 commented Jan 21, 2020

That is a bug in the package as far as I can tell. It should not be using eval-when-compile for that code. When I run make compile from the package's Makefile, then manually evaluate the resulting .elc files, I get the same error. Given that, I don't think the problem lies with straight.el.

@ndw

This comment has been minimized.

Copy link
Author

@ndw ndw commented Jan 21, 2020

Right. Sorry to bother you. I'll report that upstream.

@raxod502

This comment has been minimized.

Copy link
Owner

@raxod502 raxod502 commented Jan 21, 2020

No problem. I know it is hard to tell where the issue lies when something goes wrong in a complex system. For what it's worth, you can easily work around the problem by including :no-byte-compile t in your recipe :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.