It could be an option. We have to copy files because kolmafia looks only in
scripts/
,
relay/
, etc. What if kolmafia also looked inside (subdirectories of)
svn/
?
I don't know the details of KoLmafia's "module resolution" algorithm, but currently it walks recursively through
scripts/
and
relay/
looking for a script name. It makes file name clash a problem, with or without copying. I've seen two workarounds so far:
- Combine all code into one gigantic script, so that you minimize the chances of accidentally using a file name that another script might be using. For example, TourGuide bundles multiple small ASH files by resolving
import
statements, and combining them into one gigantic ASH file.
- Make sure that all your files have unique names. E.g. if you want to have a "support.ash", name it
ocd-cleanup.support.ash
.
Both are not ideal. But it's a behavior that many people have come to expect, and changing it would require planning and migration.
(I do wish it were different. If I want my project to contain a
test.ash
without clashing with other people's
test.ash
, putting it inside a
philmasterplus/
subdirectory should just work. Currently it does not work because of the recursive lookup.
This is why Not Copying is needed. You can't clobber files if you don't copy them in the first place.