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: try to use custom function name first #2156

Merged
merged 1 commit into from Mar 4, 2018

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 3, 2018

common use case like:

const fn = function* (ctx) {}

fn.name = `some_${var}_${now)`;
Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

common use case like:

```js
const fn = function* (ctx) {}

fn.name = `some_${var}_${now)`;
```
@fengmk2 fengmk2 requested a review from dead-horse March 3, 2018 11:41
@fengmk2 fengmk2 added this to the 1.x milestone Mar 3, 2018
/* istanbul ignore next */
const taskName = scope.name || '-';
const taskName = scope._name || scope.name || '-';
Copy link
Member Author

Choose a reason for hiding this comment

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

必须先使用 _name 才能动态设置 function 的名称

@fengmk2
Copy link
Member Author

fengmk2 commented Mar 3, 2018

@dead-horse 看看,没问题我再提交 2.x 的

@codecov
Copy link

codecov bot commented Mar 3, 2018

Codecov Report

Merging #2156 into 1.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              1.x    #2156   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          29       29           
  Lines         738      738           
=======================================
  Hits          736      736           
  Misses          2        2
Impacted Files Coverage Δ
app/extend/context.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5793718...74d04bf. Read the comment docs.

@dead-horse dead-horse merged commit be618f8 into 1.x Mar 4, 2018
@dead-horse dead-horse deleted the try-to-use-custom-name-first branch March 4, 2018 15:28
@fengmk2
Copy link
Member Author

fengmk2 commented Mar 5, 2018

@dead-horse 发版本了吗?我去提交一个 2.x patch

@dead-horse
Copy link
Member

我来发吧,你提

fengmk2 added a commit that referenced this pull request Mar 5, 2018
fengmk2 added a commit that referenced this pull request Mar 5, 2018
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.

None yet

2 participants