Skip to content

[features]: Attempt of Unification of Utility And Operation Instantiation #55

@lvyuemeng

Description

@lvyuemeng

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)

  1. Segregate as cli, runtime, system and much more by utility.
  2. cli: Parse input; call a certain functionality or feature.
  3. runtime: provide infos of current execution, such as home, cwd, xlings_home; control the current env or index.
  4. system: provide OS, Arch, PM info with their interaction.
  5. env: handle version and path.
  6. 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 | 额外补充

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions