magicant/yash-rs

Reducing dependency bloat of yash-builtin

magicant opened this issue · 1 comments

The yash-builtin crate will need to depend on the yash-semantics crate because some built-ins like eval and . need to execute parsed commands.
On the other hand, the yash_builtin::common module only depends on the yash-env crate.
It is not desirable for the yash-builtin crate to incur the yash-semantics dependency when you only want to use things from yash_builtin::common.

We can avoid this dependency bloat by moving yash_builtin::common to another crate like yash-builtin-common. Another option is to move yash-semantics-requiring built-ins to another crate like yash-builtin-ex.

Probably we should make yash-semantics an optional dependency of yash-builtin. By doing so, we won't have to separate crates.