E0029#
Warning name: unused_package
This warning is emitted when a package is listed as an import but no code in the current package refers to it. Remove the import if it was left over from a refactor, or use the package through its alias if the dependency is still needed.
Erroneous example#
moon.mod.json#
{
"name": "moonbit-community/E0029"
}
lib/moon.pkg#
// This package has no package-specific configuration.
moon.pkg#
import {
"moonbit-community/E0029/lib", // Warning: Unused package
}
pkgtype(kind: "executable")
top.mbt#
///|
fn main {
}
Suggestion#
Remove the unused package:
moon.pkg#
pkgtype(kind: "executable")