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

unknown variant "AvailableOnlyInDefaultEvalMethodAttr" #37

Closed
coffeenotfound opened this issue Jan 25, 2025 · 3 comments · May be fixed by EmbarkStudios/physx-rs#233
Closed

unknown variant "AvailableOnlyInDefaultEvalMethodAttr" #37

coffeenotfound opened this issue Jan 25, 2025 · 3 comments · May be fixed by EmbarkStudios/physx-rs#233

Comments

@coffeenotfound
Copy link

I'm trying to update physx-rs to a newer version and it has a little script which uses clang-ast to generate type bindings, but running it crashes with the following:

    Finished `release` profile [optimized] target(s) in 0.02s
     Running `target/release/pxbind`
[2025-01-25T23:54:25Z INFO  pxbind::dump] Gathering AST via clang...
[2025-01-25T23:54:27Z INFO  pxbind::dump] Gathered AST in 1876ms
[2025-01-25T23:54:27Z INFO  pxbind::dump] Parsing AST...
Error: failed to parse AST

Caused by:
    unknown variant `AvailableOnlyInDefaultEvalMethodAttr`, expected one of `AbiTagAttr`, `AccessSpecDecl`, `AliasAttr`, `AlignedAttr`, `AllocAlignAttr`, `AllocSizeAttr`, `AlwaysInlineAttr`, `ArrayInitIndexExpr`, `ArrayInitLoopExpr`, `ArraySubscriptExpr`, `ArrayTypeTraitExpr`, `AsmLabelAttr`, `AtomicExpr`, `AtomicType`, `AttributedStmt`, `AttributedType`, `AutoType`, `AvailabilityAttr`, `BinaryConditionalOperator`, `BinaryOperator`, `BindingDecl`, ...

(and a huge long list of other variants)

I have clang 19.1.7
Is that too new?

@dtolnay
Copy link
Owner

dtolnay commented Jan 26, 2025

This is a bug in physx-rs.

@coffeenotfound
Copy link
Author

Ah, sorry about that. I was having a hard time figuring out where exactly the damn enum is defined and who's to blame. I'm gonna try again with your patch to see if that fixes it

@coffeenotfound
Copy link
Author

Seems to work perfectly, thank you so much :D

The original repo is pretty dead though, I doubt that PR is gonna get merged soon. You might wanna close this as completed if you're happy with that

@dtolnay dtolnay closed this as completed Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants