diff --git a/src/build.er b/src/build.er index c3cd513..aff45ca 100644 --- a/src/build.er +++ b/src/build.er @@ -11,7 +11,7 @@ ac = import "ansicolor" {load_package_er_as_json!;} = import "metadata" .compile_command! vers: Versions! = - cmd as Array!(Str, _) = !["erg", "compile"] + cmd as List!(Str, _) = !["erg", "compile"] metadata = load_package_er_as_json!() if! metadata.get("py_command") isnot! None, do!: cmd.push! "--py-command" diff --git a/src/cfg.er b/src/cfg.er index 7d1abf0..1349d5c 100644 --- a/src/cfg.er +++ b/src/cfg.er @@ -12,7 +12,7 @@ sys = pyimport "sys" .allow_dirty = Bool; .certified = Bool; .pip_check = Bool; - .args = Array(Str); + .args = List(Str); } .Config. parse!(): Self = diff --git a/src/download.er b/src/download.er index 2fc8a24..36c68b0 100644 --- a/src/download.er +++ b/src/download.er @@ -101,7 +101,7 @@ Package = Class { Package. new as_name, version, path, type, used_in := "run" = Package { .as_name; .version; .path; .type; .used_in } -.Versions! = Class Dict! { .PackageName: Array!(Package) } +.Versions! = Class Dict! { .PackageName: List!(Package) } .Versions!|<: Show|. __str__ ref self = "\{self::base}" .Versions!|<: Eq|. @@ -205,7 +205,7 @@ Package. if! not(os.path.exists! "package.lock.er"), do!: .Versions!.from_package_lock_er!::return None data = load_er_as_json! "package.lock.er" - assert data["packages"] in Array { Str: Str } + assert data["packages"] in List { Str: Str } .Versions!.from_packages! data["packages"] install_if_not_exists!(ref self, pip_check: Bool) = for! self::base.items(), ((pkg, vers),) => diff --git a/src/publish.er b/src/publish.er index c7a294f..15a04ee 100644 --- a/src/publish.er +++ b/src/publish.er @@ -29,7 +29,7 @@ check_commit!(cfg: Config) = panic """\{ac.RED}Error\{ac.RESET}: There are uncommitted changes in the current branch. If you want to publish anyway, use the `--allow-dirty` flag.""" -validate_package_er(metadata: {Str: Str or Array(Str) or Record}) = +validate_package_er(metadata: {Str: Str or List(Str) or Record}) = if metadata.get("name") == None: do panic "\{ac.RED}Error\{ac.RESET} in package.er: `name` is missing" do assert metadata["name"] in Str, "\{ac.RED}Error\{ac.RESET} in package.er: `name` must be a string" @@ -52,7 +52,7 @@ validate_package_er(metadata: {Str: Str or Array(Str) or Record}) = "\{ac.RED}Error\{ac.RESET} in package.er: `type` must be \"app\", \"lib\", \"hybrid\" or \"decl\"" if metadata.get("authors") == None: do panic "\{ac.RED}Error\{ac.RESET} in package.er: `authors` is missing" - do assert metadata["authors"] in Array(Str): + do assert metadata["authors"] in List(Str): "\{ac.RED}Error\{ac.RESET} in package.er: `authors` must be a list of strings" create_pr! cfg: Config, user_name, metadata = @@ -82,7 +82,7 @@ create_pr! cfg: Config, user_name, metadata = discard download_dependencies_on_demand! cfg check_commit! cfg metadata = load_package_er_as_json!() - assert metadata in {Str: Str or Array(Str) or Record} + assert metadata in {Str: Str or List(Str) or Record} validate_package_er metadata if! not(cfg.no_verify), do!: check!(cfg)