Error converting multiple DSLX files into a single IR package
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
I experience an error when converting multiple DSLX files into a single IR package.
There are two files (a.x and b.x) with the contents below:
a.x
```
pub fn a() -> u32 {
u32: 42
}
fn b() -> u32 {
u32: 64
}
```
b.x
```
import a
fn b() -> u32 {
u32: 42 + a::a()
}
```
When executing the command to convert these files into a single IR package, I receive an error.
The command:
```
bazel run -c opt //xls/dslx:ir_converter_main /path/to/test/b.x /path/to/test/a.x -- --package_name g --dslx_path=/path/to/test/
```
The error:
```
Check failed: ::absl::OkStatus() == (status) (OK vs. INTERNAL: XLS_RET_CHECK failure (xls/dslx/ir_converter.cc:1839) package_data_.ir_to_dslx.contains(f) __a__a
```
When I change the order of the input file by swapping them, I receive a different error.
The command:
```
bazel run -c opt //xls/dslx:ir_converter_main /path/to/test/a.x /path/to/test/b.x -- --package_name g --dslx_path=/path/to/test/
```
The error:
```
Check failed: ::absl::OkStatus() == (status) (OK vs. INTERNAL: XLS_RET_CHECK failure (xls/ir/verifier.cc:1566) !name_set->contains(function_base->name()) Function/proc/block with name __a__a is not unique within package g
```
Contributor guide
Assessment
This issue has not been assessed yet.