-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
One of zig's principles as a toolchain is to reduce dependencies on global state of the system, so that collaborators on wildly different systems can have a seamless experience working with each other.
To that end, this code should be deleted:
Lines 112 to 123 in 7a9500f
| if (!options.ignore_include_env_var) { | |
| const INCLUDE = std.process.getEnvVarOwned(allocator, "INCLUDE") catch ""; | |
| defer allocator.free(INCLUDE); | |
| // TODO: Should this be platform-specific? How does windres/llvm-rc handle this (if at all)? | |
| var it = std.mem.tokenize(u8, INCLUDE, ";"); | |
| while (it.next()) |search_path| { | |
| var dir = openSearchPathDir(options.cwd, search_path) catch continue; | |
| errdefer dir.close(); | |
| try search_dirs.append(.{ .dir = dir, .path = try allocator.dupe(u8, search_path) }); | |
| } | |
| } |
All include paths that are intended to be observed by resinator should be provided explicitly by the user, and explicitly for resinator and no other files, and it should be per invocation rather than global.
I noticed this when enhancing zig env to tattle on what environment variables are possibly observed by the compiler, and it's unfortunate that INCLUDE is in this list.
cc @squeek502
squeek502
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.