Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Make Documentation Examples Compile#2310

Merged
bkchr merged 19 commits intomasterfrom
make-examples-compile
Apr 18, 2019
Merged

Make Documentation Examples Compile#2310
bkchr merged 19 commits intomasterfrom
make-examples-compile

Conversation

@joepetrowski
Copy link
Contributor

@joepetrowski joepetrowski commented Apr 17, 2019

Make documentation examples compile for the following modules:

  • balances
  • sudo
  • aura
  • timestamp
  • staking
  • consensus
  • contract
  • executive

@joepetrowski joepetrowski added A3-in_progress Pull request is in progress. No review needed at this stage. I6-documentation Documentation needs fixing, improving or augmenting. labels Apr 17, 2019
//! T::BlockNumber::max_value(),
//! WithdrawReasons::all()
//! );
//! // <Ledger<T>>::insert(controller, ledger); // Commented out as we don't have acces to Staking's storage here.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use a different example here? Or just drop the last line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I looked a lot. The problem is the nature of Currency in general, in that if you are locking or transferring funds, you are probably doing a lot of checks and/or writing to storage because the currency event was in response to some other event (like seconding a referendum). I'm OK with removing it.

@gui1117
Copy link
Contributor

gui1117 commented Apr 17, 2019

consensus compiles at least but I think the doc example could be improved and maybe some removed

@joepetrowski
Copy link
Contributor Author

In staking, I removed a lot of examples that were just taken from the test file and require a large mock environment to compile. Open to re-introducing them if people think they are useful.

ltfschoen added a commit that referenced this pull request Apr 17, 2019
@joepetrowski joepetrowski added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. A4-gotissues labels Apr 18, 2019
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

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

overly indented example

@bkchr bkchr merged commit b307cb3 into master Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. I6-documentation Documentation needs fixing, improving or augmenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants