Skip to content

Conversation

@iorveth
Copy link
Contributor

@iorveth iorveth commented Jul 28, 2020

This PR aims to upgrade content directory to substrate version 2.0.0-rc4

Closes: #1054

To minimize merge conflict potential, this PR assumes #1064 will be merged first.

@iorveth iorveth changed the title Cont dir substrate 2 0 Cont dir substrate 2.0.0-rc4 version upgrade Jul 28, 2020
@iorveth iorveth requested a review from bedeho July 28, 2020 15:53
@iorveth iorveth self-assigned this Jul 28, 2020
@iorveth iorveth changed the title Cont dir substrate 2.0.0-rc4 version upgrade substrate 2.0.0-rc4 version upgrade Jul 28, 2020
@bedeho
Copy link
Member

bedeho commented Aug 4, 2020

I think I will just leave this review to @shamil-gadelshin

Copy link
Contributor

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a strict rule for that but I recommend to comment all public methods or type definitions (for example in the storage definition): it could be done with temporary enabling this code line: #![warn(missing_docs)] .

Also, I like that for such a complex module it's very clean and understandable. Good work!

frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have a common format for dependencies: single line based similar to parity's format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 0e4cfb1

sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}

[features]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you sort feature-definitions similar to dependencies order: it's easier to check them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, 0e4cfb1

std = [
'serde',
'codec/std',
'rstd/std',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename rstd to sp-std - similar to the new format in the Substrate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 0e4cfb1

@@ -1,40 +1,34 @@
[package]
name = 'substrate-content-directory-module'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename it to 'pallet-content-directory'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here 0e4cfb1


/// Type, used in diffrent numeric constraints representations
type MaxNumber = u32;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not too far out your current scope could you perform actual error conversion to the Substrate decl_error! macro?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here 0ed9ecd,
65cdabb

@iorveth
Copy link
Contributor Author

iorveth commented Aug 11, 2020

We don't have a strict rule for that but I recommend to comment all public methods or type definitions (for example in the storage definition): it could be done with temporary enabling this code line: #![warn(missing_docs)] .

Thanks for pointing that feature. Added missing comments for the all public functions, traits and structure fields.
b570a9a

@iorveth iorveth changed the base branch from content_directory_second_try to council_rework August 15, 2020 21:00
@iorveth iorveth changed the base branch from council_rework to content_directory_second_try August 15, 2020 21:00
Copy link
Contributor

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work on error conversion!

@shamil-gadelshin shamil-gadelshin merged commit 81ad157 into Joystream:content_directory_second_try Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants