mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
autodoc: fix package issue when analyzing stdlib
This commit is contained in:
parent
d2baf404a5
commit
cd357fc767
@ -1032,12 +1032,18 @@ fn walkInstruction(
|
||||
|
||||
// Immediately add this package to the import table of our
|
||||
// current package, regardless of wether it's new or not.
|
||||
const current_package = self.packages.getPtr(file.pkg).?;
|
||||
_ = try current_package.table.data.getOrPutValue(
|
||||
self.arena,
|
||||
path,
|
||||
self.packages.getIndex(other_package).?,
|
||||
);
|
||||
if (self.packages.getPtr(file.pkg)) |current_package| {
|
||||
// TODO: apparently, in the stdlib a file gets analized before
|
||||
// its package gets added. I guess we're importing a file
|
||||
// that belongs to another package through its file path?
|
||||
// (ie not through its package name).
|
||||
// We're bailing for now, but maybe we shouldn't?
|
||||
_ = try current_package.table.data.getOrPutValue(
|
||||
self.arena,
|
||||
path,
|
||||
self.packages.getIndex(other_package).?,
|
||||
);
|
||||
}
|
||||
|
||||
if (result.found_existing) {
|
||||
return DocData.WalkResult{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user