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

[llvm-lit] Unhashable TypeError 'GlobItem' with lit’s internal shell #102389

Closed
Harini0924 opened this issue Aug 7, 2024 · 0 comments · Fixed by #101590
Closed

[llvm-lit] Unhashable TypeError 'GlobItem' with lit’s internal shell #102389

Harini0924 opened this issue Aug 7, 2024 · 0 comments · Fixed by #101590
Assignees
Labels

Comments

@Harini0924
Copy link
Contributor

Harini0924 commented Aug 7, 2024

The RUN: lines in the long-object-path.cpp file are encountering unhashable type errors for GlobItem instances. This issue occurs due to improper handling of GlobItem instances within the test execution logic, specifically in the _executeShCmd function in lit's TestRunner.py.
The error is encountered in the TestRunner.py file, specifically within the _executeShCmd function at line 770:
inproc_builtin = inproc_builtins.get(args[0], None)

Error Displayed:

inproc_builtin = inproc_builtins.get(args[0], None)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'GlobItem'```
ilovepi pushed a commit that referenced this issue Aug 14, 2024
…101590)

When using the lit internal shell with the command:
```
LIT_USE_INTERNAL_SHELL=1 ninja check-compiler-rt
```
The follow error is encountered:
```
File "TestRunner.py", line 770, in _executeShCmd
    inproc_builtin = inproc_builtins.get(args[0], None)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'GlobItem'
```
This error is in a compiler-rt file:
```
TestCases/Linux/long-object-path.cpp
```
This error occurs because `args[0]` is of type `GlobItem`, which is not
hashable, leading to a `TypeError` when it is passed in
`inproc_builtins.get()`. To resolve this issue, I have updated the
implementation to ensure that `args[0]` is hashable before it is used in
`inproc_builtins`.
fixes: #102389
[link to
RFC](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179)
bwendling pushed a commit to bwendling/llvm-project that referenced this issue Aug 15, 2024
…lvm#101590)

When using the lit internal shell with the command:
```
LIT_USE_INTERNAL_SHELL=1 ninja check-compiler-rt
```
The follow error is encountered:
```
File "TestRunner.py", line 770, in _executeShCmd
    inproc_builtin = inproc_builtins.get(args[0], None)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'GlobItem'
```
This error is in a compiler-rt file:
```
TestCases/Linux/long-object-path.cpp
```
This error occurs because `args[0]` is of type `GlobItem`, which is not
hashable, leading to a `TypeError` when it is passed in
`inproc_builtins.get()`. To resolve this issue, I have updated the
implementation to ensure that `args[0]` is hashable before it is used in
`inproc_builtins`.
fixes: llvm#102389
[link to
RFC](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179)
@Harini0924 Harini0924 self-assigned this Aug 25, 2024
@Harini0924 Harini0924 changed the title [llvm-lit] Unhashable TypeError 'GlobItem' in lit’s internal shell [llvm-lit] Unhashable TypeError 'GlobItem' with lit’s internal shell Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants