-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
.github/ISSUE_TEMPLATE: add a required "target" field to bug.yml #11738
Comments
An alternative is to have a |
The command |
Here is a simple patch to add support for dumping the native target in the diff --git a/src/print_env.zig b/src/print_env.zig
index ad772d416..f1a786392 100644
--- a/src/print_env.zig
+++ b/src/print_env.zig
@@ -21,6 +21,10 @@ pub fn cmdEnv(gpa: Allocator, args: []const []const u8, stdout: std.fs.File.Writ
const global_cache_dir = try introspect.resolveGlobalCacheDir(gpa);
defer gpa.free(global_cache_dir);
+ const info = try std.zig.system.NativeTargetInfo.detect(gpa, .{});
+ const triple = try info.target.zigTriple(gpa);
+ defer gpa.free(triple);
+
var bw = std.io.bufferedWriter(stdout);
const w = bw.writer();
@@ -42,6 +46,9 @@ pub fn cmdEnv(gpa: Allocator, args: []const []const u8, stdout: std.fs.File.Writ
try jws.objectField("version");
try jws.emitString(build_options.version);
+ try jws.objectField("target");
+ try jws.emitString(triple);
+
try jws.endObject();
try w.writeByte('\n');
try bw.flush(); The
|
Here is a patch for diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 31fb479b5..c73636e83 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -17,6 +17,14 @@ body:
placeholder: "0.9.0-dev.1275+ac52e0056"
validations:
required: true
+ - type: input
+ id: target
+ attributes:
+ label: Native Target Triple
+ description: "The target field from `zig env`"
+ placeholder: "x86_64-linux.5.17.9...5.17.9-gnu.2.19"
+ validations:
+ required: true
- type: textarea
id: repro
attributes: It depends on PR #11741, and probably the label and description should be improved. |
Add a new required field "Zig Target Triple" to the bug.yml template. Closes ziglang#11738
No thank you |
Reading some open issues I noted that it is not easy to determine if a bug manifests only for some operating systems (like Windows).
I propose to add a new required field to
bug.yml
namedtarget
, containing thearch-os-abi
triple.The Zig compiler should also have a command to display the native target.
Currently the only method I know is
zig targets | grep -A 512 native
Thanks.
The text was updated successfully, but these errors were encountered: