Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kludge to deal with the appearance of forge-forgejo.el
"package.el" does not compile packages in a clean environment, so if a package is already loaded when it is being updated, all kinds of breakage can happen (including but by far not limited to the current issue). Forge also does a nasty thing; "forge.el" first `provide's its feature and then `require's the various back-end libraries, including the newly added "forge-forgejo.el". This makes it possible to (require 'forge) in the back-end libraries, and at the same time for other libraries to depend on "forge.el" taking care of loading the back-end libraries. If `forge' is already loaded then (require 'forge) does nothing when a library that contains that is being compiled. That also means that the newly added (require 'forge-forgejo) in that library is not evaluated. "forge-commands.el" contains code that errors at compile-time if a referenced type is unknown, `forge-forgejo-repository' in this case. We inject an additional (require 'forge-forgejo) in "forge-commands.el" to make sure the type is known during compilation, even when upgrading from a Forge version that didn't have that library and that version is already loaded in the current Emacs session. Closes #743.
- Loading branch information
4e8b837
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and for the detailed explanation. Very helpful to understand the complexities with package updates for the future.