Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.dependency unable to find existent module when compiling with zig-cli, works fine through git #18282

Closed
enderger opened this issue Dec 14, 2023 · 2 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@enderger
Copy link

enderger commented Dec 14, 2023

Zig Version

0.12.0-dev.1828+225fe6ddb

Steps to Reproduce and Observed Behavior

I don't have the knowledge of compiler internals needed to produce a minimal example, so here's how I ran into it

  1. Create a project with the latest version of zig-cli installed via build.zig.zon and build.dependency (the standalone example in that crate works as a testbed if you fetch the latest version)
  2. Attempt to compile the project
  3. See that the build failed with the panic message thread 2889359 panic: unable to find module 'zig-cli'

Expected Behavior

The module should be detected and building should work fine (like if you use git submodules).

@enderger enderger added the bug Observed behavior contradicts documented or intended behavior label Dec 14, 2023
ianprime0509 added a commit to ianprime0509/zig-cli that referenced this issue Dec 15, 2023
Without this, the package manager will not include build.zig in the
fetched package, leading to the resulting package being unusable.

See ziglang/zig#18282
@ianprime0509
Copy link
Contributor

This isn't a bug in Zig, but rather in zig-cli. I submitted a PR to that project fixing the issue, with an explanation: sam701/zig-cli#29

@enderger
Copy link
Author

Alright, though honestly the error message should probably be less obtuse. I'll close this and open a new one requesting a better error.

daogilvie added a commit to daogilvie/raylib-zig that referenced this issue Apr 28, 2024
As per some info found through ziglang/zig#18282,
this is apparently necessary to use this library as a dependency.
daogilvie added a commit to daogilvie/raylib-zig that referenced this issue Apr 28, 2024
As per some info found through ziglang/zig#18282,
this is apparently necessary to use this library as a dependency.
daogilvie added a commit to daogilvie/raylib-zig that referenced this issue Apr 28, 2024
As per some info found through ziglang/zig#18282,
this is apparently necessary to use this library as a dependency.
Not-Nik added a commit to Not-Nik/raylib-zig that referenced this issue Apr 28, 2024
As per some info found through ziglang/zig#18282,
this is apparently necessary to use this library as a dependency.

Co-authored-by: Drum Ogilvie <me@daogilvie.com>
Not-Nik added a commit to Not-Nik/raylib-zig that referenced this issue Apr 28, 2024
* Update to Zig 0.12.0 and raylib 5.1-dev

* More build.zig fixes for 0.12

* Get module with target and optimization

* Add examples to build step when compiling for emscripten

* Remove unused function

* Add build.* and emcc.zig to the zon paths (#83)

As per some info found through ziglang/zig#18282,
this is apparently necessary to use this library as a dependency.

Co-authored-by: Drum Ogilvie <me@daogilvie.com>

* Update binding

---------

Co-authored-by: Drum Ogilvie <me@daogilvie.com>
Not-Nik added a commit to Not-Nik/raylib-zig that referenced this issue Apr 28, 2024
* Update to Zig 0.12.0 and raylib 5.1-dev

* More build.zig fixes for 0.12

* Get module with target and optimization

* Add examples to build step when compiling for emscripten

* Remove unused function

* Add build.* and emcc.zig to the zon paths (#83)

As per some info found through ziglang/zig#18282,
this is apparently necessary to use this library as a dependency.

Co-authored-by: Drum Ogilvie <me@daogilvie.com>

* Update binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants