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

Fix the secondary runtime metadata #330

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

liuchengxu
Copy link
Contributor

polkadot.js is broken due to the metadata RPC call panics.

FATAL: Unable to initialize the API: -32603: Unknown error occurred: Client error: Execution failed: Runtime panicked: All path segments should be valid Rust identifiers: InvalidIdentifier { segment: 1 }

It turns out r# is unsupported by scale-info.

vedhavyas
vedhavyas previously approved these changes Apr 7, 2022
nazar-pc
nazar-pc previously approved these changes Apr 7, 2022
@nazar-pc
Copy link
Member

nazar-pc commented Apr 7, 2022

Why idea why does scale-info care about that module in the first place?

@liuchengxu
Copy link
Contributor Author

scale-info defines a Path to represent the location of a type definition which is constructed using the segments splitted from the module path using :: https://github.com/paritytech/scale-info/blob/0c4ff0b7cd135375c3b4991e6d9fd7105ca9b083/src/ty/path.rs#L100, I guess in our case some segment will contain # which is considered to be an invalid Rust identifier https://github.com/paritytech/scale-info/blob/0c4ff0b7cd135375c3b4991e6d9fd7105ca9b083/src/utils.rs#L16.

@nazar-pc
Copy link
Member

nazar-pc commented Apr 7, 2022

I used r#impl in both runtimes. Does this mean we need to fix both?

@nazar-pc
Copy link
Member

nazar-pc commented Apr 7, 2022

Also worth reporting this upstream, can you create an issue, please?

@liuchengxu liuchengxu disabled auto-merge April 7, 2022 12:03
@liuchengxu
Copy link
Contributor Author

I used r#impl in both runtimes. Does this mean we need to fix both?

Yes, missed the one in the test runtime, will update.

Also worth reporting this upstream, can you create an issue, please?

Sure, will do.

polkadot.js is broken due to the metadata RPC call panics.

```
FATAL: Unable to initialize the API: -32603: Unknown error occurred: Client error: Execution failed: Runtime panicked: All path segments should be valid Rust identifiers: InvalidIdentifier { segment: 1 }
```

It turns out `r#` is unsupported by scale-info.
@liuchengxu liuchengxu dismissed stale reviews from nazar-pc and vedhavyas via 1729f46 April 7, 2022 12:06
@liuchengxu liuchengxu force-pushed the fix-secondary-runtime-metadata branch from 6cac044 to 1729f46 Compare April 7, 2022 12:06
@liuchengxu liuchengxu merged commit 574c9fa into main Apr 7, 2022
@liuchengxu liuchengxu deleted the fix-secondary-runtime-metadata branch April 7, 2022 13:15
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 this pull request may close these issues.

None yet

4 participants