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

remove the (namespace) type and make every file an empty struct #2020

Merged
merged 10 commits into from
Mar 1, 2019

Conversation

andrewrk
Copy link
Member

@andrewrk andrewrk commented Mar 1, 2019

closes #1047

also struct types get fully qualified names, and function symbol names become fully qualified (extern and export being exceptions of course)

pub works on struct decls now

  • test on linux
  • test on macos
  • test on windows

@tgschultz this has some serialization implications regarding @typeName:

const std = @import("std");
const os = std.os;

comptime {
    @compileLog(@typeName(os.File)); // "std.os.file.File"
}

and function symbol names become fully qualified
 * fix dependency loop detection
   - closes #679
   - closes #1500
 * fix `pub`
 * fix tests
 * fix use decls
 * main package file gets a special "" namespace path
@andrewrk
Copy link
Member Author

andrewrk commented Mar 1, 2019

After this is merged, the "index.zig" convention is deprecated. The new pattern is the one set by

  • std/os/darwin.zig (and corresponding std/os/darwin/ folder)
  • std/event.zig (and corresponding std/event/ folder)

@andrewrk
Copy link
Member Author

andrewrk commented Mar 1, 2019

Never mind what I said about @typeName. That's going to remain the same. Only function symbol names and compile error messages will be affected.

@andrewrk andrewrk marked this pull request as ready for review March 1, 2019 23:03
@andrewrk andrewrk merged commit bed8108 into master Mar 1, 2019
@andrewrk andrewrk deleted the kill-namespace-type branch March 1, 2019 23:07
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.

remove the (namespace) type and make every file an empty struct
1 participant