Skip to content

Stop caching config files#194

Merged
bajtos merged 1 commit intomasterfrom
fix/require-cache
Jul 13, 2016
Merged

Stop caching config files#194
bajtos merged 1 commit intomasterfrom
fix/require-cache

Conversation

@bajtos
Copy link
Copy Markdown
Member

@bajtos bajtos commented Jun 29, 2016

This should fix the CI failures @loay is observing in strongloop/loopback-workspace#294 and myself in strongloop/loopback-workspace#298

@raymondfeng please review

cc @davidcheung @0candy @gunjpan @richardpringle

@bajtos bajtos added the #review label Jun 29, 2016
@bajtos bajtos force-pushed the fix/require-cache branch from e50e2bd to ff509b1 Compare June 29, 2016 18:12
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

var cloneDeep = require('lodash').cloneDeep;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lodash has a lot of useful utility functions, might make more sense to require it on its own so that someone can use other lodash functions without changing this line.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

another note on lodash, we had previous goals to shrink bundle size, would this be going against that,
but CI being more critical, another option would be: we are using traverse.clone() in datasource-juggler

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lodash has a lot of useful utility functions, might make more sense to require it on its own so that someone can use other lodash functions without changing this line.

I am just following the style seen in existing code, see e.g.

var cloneDeep = require('lodash').cloneDeep;

another note on lodash, we had previous goals to shrink bundle size, would this be going against that,

Bundle size is important, thank you for raising this concern. The browser bundle contains only the source code from lib/executor.js, config loader is executed during compilation, therefore it's ok to use lodash here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I stand by what I said but maybe that's just my preference.

It shouldn't stop this PR from being landed though.

@richardpringle
Copy link
Copy Markdown

LGTM

@davidcheung
Copy link
Copy Markdown
Contributor

LGTM2

@bajtos bajtos merged commit c2484a6 into master Jul 13, 2016
@bajtos bajtos deleted the fix/require-cache branch July 13, 2016 14:37
@bajtos bajtos removed the #review label Jul 13, 2016
@bajtos
Copy link
Copy Markdown
Member Author

bajtos commented Jul 13, 2016

Thank you for the review, I have landed the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants