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

self-hosted compiler does not map 'std' into every package #9204

Closed
andrewrk opened this issue Jun 22, 2021 · 0 comments · Fixed by #9533
Closed

self-hosted compiler does not map 'std' into every package #9204

andrewrk opened this issue Jun 22, 2021 · 0 comments · Fixed by #9533
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone

Comments

@andrewrk
Copy link
Member

test.zig

const bar = @import("bar");
pub fn main() void {
    _ = bar;
}

bar.zig

const std = @import("std");

comptime {
    _ = std;
}

Actual Output

$ ./zig-out/bin/zig build-exe test.zig --pkg-begin bar bar.zig --pkg-end
bar.zig:1:21: error: unable to open 'std': PackageNotFound
const std = @import("std");
                    ^

Expected Output

It should succeed the build. 'builtin' and 'root' should additionally be mapped into every package.

@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Jun 22, 2021
@andrewrk andrewrk added this to the 0.9.0 milestone Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant