-
Notifications
You must be signed in to change notification settings - Fork 7
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
Managing Many Modules (M3) #263
Comments
Hm can not it simply be solved by naming modules properly? Like Breaking changes. When you are creating module for other people to use you should not make breaking changes. |
This would help to minimize the clashes, but not eliminate entirely. Imagine it happened, and now you have
There can be many reasons to stick to a particular version of the module, not necessarily causing function interface change.
|
Modloader is exact answer to problem of multiple mods trying to use same filenames. Regarding the module versions. Why there is new version?
For no.1 version does not matter, for no.2 it is even harmful to use older one, 3 actually requires older version. |
modules.ini is a global CLEO config file. It's only purpose is to help to resolve collisions. Most of the time will be empty. But when needed, it will be there. And no, module resolution has nothing to do with paths. Moving module to its own directory requires code change, this is not the same situation I describe. Again, imagine 2 scripts loading utils.s. You can not change the code. But you want to run them, and only thing that stops you is the module name. Ignore versioning, I already said it might be too difficult to maintain. Focus on one example that I gave. How to run both scripts? |
If there is module like utils.s to live along main cs file it is sign the mod was meant to be used via ModLoader. Then it will not be possible to simply use it as intended. |
I agree that Modloader might help. My point was that CLEO should provide a way to fix file collisions using CLEO only. If user is unfamiliar with script code and don't or can't use ML (which is not that uncommon), they could at least be advised to update their modules.ini |
ML itself has collision resolution with user-defined priorities, and they don't advise using third-party tools for that |
I think it need to be checked how modules loading is implemented at this moment. |
modules should be resolved just like any filepath. import from CLEO\mod.s |
M3 is a hypothetical situation where we have hundreds of CLEO5 modules available for use. This triggers some problems, such as:
Name Clashing
Example: two authors develop their scripts and modules. They call their modules
utils.s
. It is now impossible to install both scripts because you can only have one module.Breaking Changes
Example: large and popular module used by many scripts. Author finds a bug and changes the function definition (e.g. adds an extra param).
Discoverability
How to find a module that is useful for me? What should I know before using it? Modules may or may not come with source code supplied.
Potential Solutions
modules.ini
where the user can map modules to different filenames. E.g. for scriptsa.cs
andb.cs
each usingutils.s
this may look as follows:the CLEO will use this mapping to correctly resolve module calls.
Breaking Changes. Semver, with MAJOR.MINOR versioning. Modules may have an optional version part in their name, e.g.
[email protected]
. Then you may also have[email protected]
,[email protected]
.Now, lets see what happens, when CLEO encounters a module call:
[email protected]
(or any 1.X version) orutils.s
in that order[email protected]
(most recent 1.X version)[email protected]
(most recent 2.X version)[email protected]
(exact match)[email protected]
(exact match)Discoverability. Document modules and their exported functions in SBL. Similar to Native code section for SA.
The text was updated successfully, but these errors were encountered: