trueagi-io / hyperon-experimental

MeTTa programming language implementation
https://metta-lang.dev
MIT License
123 stars 43 forks source link

Code doesn't compile without "pkg_mgmt" feature enabled #651

Closed vsbogd closed 1 week ago

vsbogd commented 3 months ago

Describe the bug

While we have "pkg_mgmt" feature, the code doesn't compile if feature is removed from the list of features.

To Reproduce

  1. cd ./lib
  2. cargo build --no-default-features

Expected behavior Core library is built without errors.

Actual behavior Error output:

$ cargo build --no-default-features
   Compiling hyperon v0.1.8 (./trueagi/hyperon-experimental/lib)
warning: unused import: `module_name_is_legal`
  --> lib/src/metta/runner/modules/mod.rs:24:85
   |
24 | pub(crate) use mod_names::{ModNameNode, mod_name_from_path, mod_name_relative_path, module_name_is_legal, ModNameNodeDisplayWrapper};
   |                                                                                     ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error[E0599]: no method named `load_module_at_path` found for struct `runner::Metta` in the current scope
   --> lib/src/metta/runner/stdlib.rs:252:20
    |
252 |         self.metta.load_module_at_path(path, None).map_err(|e| ExecError::from(e))?;
    |                    ^^^^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `load_module_alias`
    |
   ::: lib/src/metta/runner/mod.rs:103:1
    |
103 | pub struct Metta(Rc<MettaContents>);
    | ---------------- method `load_module_at_path` not found for this struct

For more information about this error, try `rustc --explain E0599`.
warning: `hyperon` (lib) generated 1 warning
error: could not compile `hyperon` (lib) due to 1 previous error; 1 warning emitted

Additional context

$ rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
$ cargo --version
cargo 1.76.0 (c84b36747 2024-01-18)