[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Circular dependencies between libraries - what to do?
From: |
Thorsten Jolitz |
Subject: |
Re: Circular dependencies between libraries - what to do? |
Date: |
Sun, 21 Sep 2014 00:03:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Emanuel Berg <embe8573@student.uu.se> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> (1) how to use require without introducing circular
>> dependencies?
>
> At the top of a file, put the require:s, e.g.,
>
> (require 'message)
> (require 'moggle)
>
> Then at the end of the file, put
>
> (provide 'message-my)
ok, I knew that ;)
> If you get a circular dependency (which I never did
> with 50+ init files, but OK, I suppose I would solve it
> like this) - break the file in two so you get clean
> modules.
this is not about init files but about libraries, i.e. the Outshine
Project libraries outshine.el, outorg.el and navi-mode.el. I'm preparing
release v2.0 right now, I'm almost done, but the former clear hierarchy
(standalone core lib outshine.el, dependent add-on libs outorg and
navi-mode) has vanished since I turned them into a kind of
'org-minor-mode', now they all depend on each other and use each
other. Breaking them up is not really an option.
I would just need advice
- if can make them all (require ...) each other without causing breakage?
- or if I should rather make one of them require the other two (which
on - the highest level lib navi-mode, or the lowest-level lib
outshine.el)?
>> (2) how to declare their dependencies as MELPA
>> packages?
>
> I never used MELPA so I don't know. Do tell if when
> find out :)
>
> Good luck!
thx ;)
--
cheers,
Thorsten