Odin icon indicating copy to clipboard operation
Odin copied to clipboard

odin doc -doc-format crashes when aliasing an imported struct

Open kururen opened this issue 3 years ago • 2 comments

Context

When creating an alias for an imported struct and running odin doc -doc-format (doesn't matter whether it's a directory or a single file) it crashes with the following message:

odin doc . -doc-format D:\a\Odin\Odin\src\docs_writer.cpp(263): Assertion Failure: file_index_found != nullptr

  • Operating System & Odin Version: Odin: dev-2022-04-nightly:59025b75 OS: Windows 11 Professional (version: 21H2), build 22000.593 CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz RAM: 16301 MiB

Expected Behavior

The odin-doc files are generated.

Current Behavior

Crashes the compiler

Steps to Reproduce

Minimal example:

package bug

import "core:container/queue"

Q :: queue.Queue(int)

main :: proc() {
}

Note that it also happens with non-polymorphic structs (e.g. anything from raylib, which is where I ran into the bug). For context, the odin installation is in C:\odin

I could reproduce the same behaviour on MacOS as well, with the same version 2022-04.

kururen avatar Apr 11 '22 17:04 kururen