nektro / zigmod

📦 A package manager for the Zig programming language.
MIT License
769 stars 35 forks source link

No local packages? #105

Open jeffbdavenport opened 4 months ago

jeffbdavenport commented 4 months ago

I don't understand why it's impossible to add a local package? Seems like this to me is more important than remote packages, why is this preferred over Gyro which is way simpler to use and supports adding local packages pretty easily?

nektro commented 4 months ago

there are indeed local packages https://github.com/nektro/zigmod/blob/master/docs/zig.mod.md#dep-src

nektro commented 4 months ago

eg

dependencies:
  - src: local path/to/folder
jeffbdavenport commented 4 months ago

Oh thank you. Hmm last time I tried this, it didn't work.

jeffbdavenport commented 4 months ago

@nektro This does not work. zigmod fetch completely messes up the deps.zig with messed up characters with that set. If I try to fix the characters it still says module does not exist:

pub const package_data = struct {
    pub var _root = Package{
        .directory = dirs._root,
        .dependencies = &.{ &_kaxlt5olnjjv },
    };
    pub var _������������ = Package{
        .directory = dirs._������������,
        .import = .{ "../dungeon_weld", .{ .path = dirs._������������ ++ "/src/main.zig" } },
        .dependencies = &.{ },
    };
    pub var _kaxlt5olnjjv = Package{
        .directory = dirs._kaxlt5olnjjv,
        .dependencies = &.{ &_������������ },
    };
};
id: kaxlt5olnjjvva02l9c1fukv2j79ospasy0j1zprhb14tvfc
name: tower_of_embers
license: None
description: None
root_dependencies:
dependencies:
  - src: local ../dungeon_weld
nektro commented 4 months ago

thanks for the report. i know what change caused this.