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

Add gitignore support for the Zig programming language #3442

Closed
wants to merge 2 commits into from
Closed

Add gitignore support for the Zig programming language #3442

wants to merge 2 commits into from

Conversation

timmyjose
Copy link

Reasons for making this change:

We already have linguist support for Zig, but we do not have a .gitignore template for Zig projects created under Github. This PR aims to provide support for that.

Links to documentation supporting these rule changes:

Source for .gitignore template - https://github.com/ziglang/zig/blob/master/.gitignore

Link to application or project’s homepage:
https://ziglang.org (homepage)
https://github.com/ziglang/zig/ (main repo page)

@timmyjose
Copy link
Author

Hello, I'm just curious - is there anything blocking this PR from being merged, or is there any other reason for keeping it open?

@IridescentRose
Copy link

I'd love to see this happen

Comment on lines +5 to +7
**/build/
**/build-*/
**/docgen_tmp/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these belong in a generic zig gitignore template, they are cmake/c++ related. Only zig-cache and zig-out should be included.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also *.pdb and *.exe?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But Zig creates them when compiling...

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using the zig build system? I assume not as if you were they would be placed in zig-out.

There is no way to know what organization projects not using the zig build system will use, so they should IMO not be handled here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Zig build system is a project outside of the main compiler, and those who don't use this system should also be taken into account.

Copy link

@ifreund ifreund Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Zig build system is a project outside of the main compiler,

No, it's part of the main compiler, see the zig build command.

and those who don't use this system should also be taken into account.

There's no way to take them into account, as there is no standard place artifacts are stored if not using the zig build system.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyhow, I'm not the target audience of this repo. I just add whatever files make sense to my .gitignore manually. As such, I don't really care what gets merged here personally. I am however a member of the zig core team.

@serjan-nasredin
Copy link
Contributor

Hi @bdougie, please review this.

@svc-user
Copy link

This should not be merged as is. The changes does not reflect what artifacts zig build creates.

The zig build command (the built in build system that comes with Zig) only makes two directories those being zig-out containing the final libraries or binaries and the zig-cache which contains built artifacts helping to speed up subsequent builds.

The build, build-* and docgen_tmp directories in @timmyjose's PR are not standard directories when using Zig as the end
user.

The Zig .gitignore file should really be nothing but:

# This file is for zig-specific build artifacts.

zig-cache/
zig-out/

@alichraghi
Copy link

@timmyjose has not committed/commented for almost two years. i think we have to make another PR

@svc-user
Copy link

svc-user commented Feb 16, 2022

I've taken the liberty to open a new PR #3975 due to Timmy being inactive on this issue.

@timmyjose
Copy link
Author

I've taken the liberty to open a new PR #3975 due to Timmy being inactive on this issue.

Agreed. I'm not active in the Zig community anymore. I will close this PR seeing that you've created a new PR for that. Thanks!

@timmyjose
Copy link
Author

timmyjose commented Feb 27, 2022

Closing in favour of #3975

@timmyjose timmyjose closed this Feb 27, 2022
@nathany nathany mentioned this pull request Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants