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

Compiler Error #77

Open
tmheath opened this issue Feb 16, 2024 · 2 comments
Open

Compiler Error #77

tmheath opened this issue Feb 16, 2024 · 2 comments

Comments

@tmheath
Copy link

tmheath commented Feb 16, 2024

I just downloaded zig 0.12 on Windows 10 and I added, the sole line to import capy into the default program right at the top. It does not compile moreover upon looking up this error message, as of 0.12 zig compiler now happily enforces all variables requiring to be mutated at least once unless declared with const. This is my first real zig project I'm trying and I only just started, I might download 0.11 to use as a temporary workaround. I'd think this was my system if I didn't put two and two together.

https://ziggit.dev/t/error-local-variable-is-never-mutated/2238/20

C:\Users\Tim.Heath\AppData\Local\zig\p\12201751d2094cde9630bc080e6ce1d8982ff03bdd30a3103abd21321a8361a7e39d\android\build\auto-detect.zig:158:13: error: local variable is never mutated
        var android_studio_key: HKEY = for ([_]HKEY{ HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE }) |root_key| {

This caught me entirely off guard because I just downloaded zig totally fresh, set my path, and went to follow the guide at the below link (not exactly but just one step at a time towards my goal).

https://capy-ui.org/docs/getting-started/first-application/

@tmheath
Copy link
Author

tmheath commented Feb 16, 2024

Indeed, I downloaded zig 0.11 and the issue is gone. Rust's borrow checker is a source of extreme hype, I've gotten segfaults with it, it's irritating is all.

@JoshuaStather
Copy link

I can't build zig-template on windows 11 either on zig 0.12.0-dev.3180+83e578a18 or zig 0.11.0 :(

build.zig.zon:

.{
    .name = "capy-template",
    .version = "0.0.0",
    .paths = .{"."},
    .dependencies = .{ .capy = .{
        .url = "https://github.com/capy-ui/capy/archive/bde4d1016b4cdebaf4237ea3f50dde306cbe4115.tar.gz",
        .hash = "12209fbb2509ded636aac9233e002679cbaa000d68d44e936d6eb3f36c93a7d4b6f3",
    } },
}

master branch of capy doesn't work either, nor any release I've tried...

Does anyone have a winning combo of zig-template + zig + capy versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants