zigmod icon indicating copy to clipboard operation
zigmod copied to clipboard

`generate` subcommand only accounts for author's OS with `only_os`

Open TUSF opened this issue 2 years ago • 2 comments
trafficstars

In my zigmod.yml, I have:

dependencies:
  - {
    src: git https://github.com/marlersoft/zigwin32,
    only_os: windows
  }
  - {
    src: system_lib dwrite,
    only_os: windows
  }

This works well enough when using the fetch subcommand, but if I use the generate subcommand, the generated deps.zig file will assume whoever is building the package is on the same OS as whoever ran zigmod generate.

This makes generate no different from fetch for libraries depending on OS-specific libraries & APIs.

TUSF avatar Jan 02 '23 22:01 TUSF

this would require quite a rework of how the command currently works and is a known limitation. given that upstream work on the native package manager is now underway this is unlikely to get fixed in zigmod but ill leave this open in case i get a lightbulb of inspiration

nektro avatar Jan 03 '23 21:01 nektro

Understandable. Does seem like it might turn out to be a lot of work for something that might end up obsolete pretty soon.

TUSF avatar Jan 03 '23 21:01 TUSF