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

gpu: remove usingnamespace for callbacks.zig and types.zig #798

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

michael-brennan2005
Copy link
Contributor

@michael-brennan2005 michael-brennan2005 commented Jun 4, 2023

Continuing off of issue #796 and pull request #797, I removed the usingnamespaces for callbacks.zig and types.zig and added their types.

I wrote up a basic python script for this: it looks for all pub consts or pub fns in the file and then generates the re-exports. It only writes one @import per each file and then uses a variable to do the re-exports, but I did a simple find and replace for @imports on each declaration, to keep it unified with what #797 did.

Here's the script if this could be useful for removing more usingnamespace: https://gist.github.com/tech0tron/e26d54d057e6c030b1d773dcf3b5350c

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

libs/gpu/src/main.zig Outdated Show resolved Hide resolved
Copy link
Member

@slimsag slimsag left a comment

Choose a reason for hiding this comment

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

Excellent work, thank you!

@slimsag slimsag changed the title core/gpu: remove usingnamespace for callbacks.zig and types.zip gpu: remove usingnamespace for callbacks.zig and types.zip Jun 5, 2023
@slimsag slimsag changed the title gpu: remove usingnamespace for callbacks.zig and types.zip gpu: remove usingnamespace for callbacks.zig and types.zig Jun 5, 2023
@slimsag slimsag merged commit fef0299 into hexops:main Jun 5, 2023
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

Successfully merging this pull request may close these issues.

2 participants