radian-software / straight.el

🍀 Next-generation, purely functional package manager for the Emacs hacker.
MIT License
2.75k stars 151 forks source link

straight-check-package causes subsequent calls to straight-freeze-versions to omit dependencies #677

Open mjoerg opened 3 years ago

mjoerg commented 3 years ago

What's wrong

When calling straight-check-package a subsequent call to straight-freeze-versions will prompt to reload the init file and if confirmed will result in package dependencies missing from the generated lockfile.

Directions to reproduce

  1. Run bug.sh
  2. M-x create-bug-report
  3. y for prompt "Caches are outdated, reload init-file? (y or n)"

This demonstrates the issue by setting up package f.el and then calls straight-check-package and straight-freeze-versions. The generated lockfile misses dash.el and s.el.

Output from my setup

Version information

raxod502 commented 3 years ago

OK, looks like we've got one bug and one UX issue here:

Thank you for the detailed report!

raxod502 commented 3 years ago

Oh, and a quick note since it probably isn't obvious to anyone who didn't write the code---but the reason straight-check-package invalidates the recipe cache is because it operates by calling straight-use-package, which (in the general case) could add a new package, or reconfigure an existing one. I guess we could update straight-check-package so it calls directly through to the modification detection and build system layer, rather than going all the way from the top.