-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Description
deps.zig fails to compile with a message like so:
$ zig build run-simple
C:\Users\Alexis Brodeur\Projects\github.com\brodeuralexis\webgpu\deps.zig:67:129: error: invalid escape character: 's'
.pkg = Pkg{ .name = "webgpu-backend-dummy", .source = .{ .path = dirs._5lfigtl33bkz ++ "/./modules/webgpu-backend-dummy\src/backend.zig" }, .dependencies = null },
Both of these snippets of code make it so deps.zig generated on Windows does not compile if local dependencies are used:
Line 287 in 6a2d664
| if (d.type == .local) dd.main = try std.fs.path.join(options.alloc, &.{ d.main, save.main }); |
This uses the primary separator, which is \ on Windows.
Lines 287 to 293 in 6a2d664
| try w.print( | |
| \\ .pkg = Pkg{{ .name = "{s}", .source = .{{ .path = dirs._{s} ++ "/{s}" }}, .dependencies = | |
| , .{ | |
| mod.name, | |
| mod.short_id(), | |
| mod.main, | |
| }); |
This does not escape special characters.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working