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

feat: wrap the log macros to fix ill formed macros #897

Merged
merged 9 commits into from
Jun 1, 2019

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented May 24, 2019

Commits:

  • chore: update the log filter template in configuration
  • chore: apply new log macros to sync & relay
  • chore: apply new log macros to util/* & ckb-bin
  • chore: apply new log macros to verification & shared
  • chore: apply new log macros to rpc & notify
  • chore: apply new log macros to network
  • chore: apply new log macros to miner
  • chore: apply new log macros to chain
  • (important) feat: wrap the log macros to fix ill formed macros

And, we have to update the log filters, add prefix ckb- for all our crates, since I use target: env!("CARGO_PKG_NAME").

@nervos-bot
Copy link

nervos-bot bot commented May 24, 2019

@quake is assigned as the chief reviewer

@nervos-bot
Copy link

nervos-bot bot commented May 24, 2019

CI status of the fork branch is Build Status

@doitian
Copy link
Member

doitian commented May 30, 2019

Any plan to undraft?

The team, @nervosnetwork/ckb-dev, Any option?

@keroro520
Copy link
Contributor

Any plan to undraft?

The team, @nervosnetwork/ckb-dev, Any option?

Prefer to use env!("CARGO_PKG_NAME").trim_left("ckb-") as targets. And then we don't need to update the log filters.

@yangby-cryptape
Copy link
Collaborator Author

Reply @keroro520:

  • env!("CARGO_PKG_NAME") return a const &'static str, no more costs.
  • trim_start(..) is not a const function.
    That means if the level of logs is enabled, it will take extra cost.
  • trim_left(..) is deprecated since 1.33.0: superseded by trim_start(..).

@keroro520
Copy link
Contributor

trim_start(..) is not a const function.

Soga. Thanks for your reply.
Why not undraft this PR?

@yangby-cryptape yangby-cryptape marked this pull request as ready for review May 31, 2019 06:20
@yangby-cryptape yangby-cryptape requested a review from a team May 31, 2019 06:20
@yangby-cryptape yangby-cryptape force-pushed the fix-ill-formed-macros branch 3 times, most recently from 62f847f to a38a22b Compare May 31, 2019 10:12
@quake quake merged commit 0a54cee into nervosnetwork:develop Jun 1, 2019
@yangby-cryptape yangby-cryptape deleted the fix-ill-formed-macros branch June 1, 2019 03:14
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.

5 participants