Features Describe | 功能描述
Current runtime is quoted by every feature, and spread out over many files includes common.lua, xlings.lua, parts of utils.lua, platform.lua. It could be parts of cli, runtime, system separation.
Usage Scenario | 需求背景/使用场景
Maybe Solutions | 可能的实现方案 - (if you are developer)
- Segregate as
cli, runtime, system and much more by utility.
cli: Parse input; call a certain functionality or feature.
runtime: provide infos of current execution, such as home, cwd, xlings_home; control the current env or index.
system: provide OS, Arch, PM info with their interaction.
env: handle version and path.
package: package_index and related utility.
Currently, there are two ways of separation, first as functionality, second as cli args. If we want to emphasize on functionality, the callee should be each functionality as args rather than install, uninstall, it's vague whether uninstall package or uninstall xlings itself. So a better choice is to separate by functionality, and abandon the verb args (xlings xim *args*). If we want to extend many, such segregation seems unavoidable.
For example:
-- cli
-- -- xim
-- -- other functionality...
-- runtime
-- package
-- other base...
Additional context | 额外补充
Features Describe | 功能描述
Current runtime is quoted by every feature, and spread out over many files includes
common.lua,xlings.lua, parts ofutils.lua,platform.lua. It could be parts ofcli,runtime,systemseparation.Usage Scenario | 需求背景/使用场景
Maybe Solutions | 可能的实现方案 - (if you are developer)
cli,runtime,systemand much more by utility.cli: Parse input; call a certain functionality or feature.runtime: provide infos of current execution, such ashome,cwd,xlings_home; control the current env or index.system: provideOS,Arch,PMinfo with their interaction.env: handle version and path.package: package_index and related utility.Currently, there are two ways of separation, first as functionality, second as cli args. If we want to emphasize on functionality, the callee should be each functionality as args rather than
install,uninstall, it's vague whetheruninstallpackage oruninstallxlingsitself. So a better choice is to separate by functionality, and abandon theverbargs (xlings xim *args*). If we want to extend many, such segregation seems unavoidable.For example:
Additional context | 额外补充