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

EZP-31982: Revert cache setting in Encore config to default #602

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

Steveb-p
Copy link
Contributor

@Steveb-p Steveb-p commented Oct 2, 2020

JIRA: EZP-31982

This in practice disables Encore built-in cache on dev environments, following Symfony's default configuration in this matter.

Fixes an issue when adding new entrypoints to webpack.config.js that were not recognized until cache was cleared - which lead
to confusing errors occuring in template files that included those entrypoints.

Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

Hmm, if Symfony default is "!kernel.debug", then this is indeed fine.

One Developer enablement request from me: we need commits that are being merged to be formed in past simple, since they're about to become a history. To simplify the process for a Maintainer, we're fine with forming a Pull Request title in the past as well, so a Maintainer can merge it as-is.

I know this is not the mainstream approach, just trying to keep consistency within the Product.

@Steveb-p
Copy link
Contributor Author

Steveb-p commented Oct 2, 2020

@alongosz agreed.

To clarify, Symfony does not set that config value for environments other than prod in their template. Then the extension treats it as false by default:

->booleanNode('cache')
    ->info('Enable caching of the entry point file(s)')
    ->defaultFalse()
->end()

In production config files it is set to true, which is the case for us as well.

In practice disabled Encore built-in cache on dev environments, following Symfony's default configuration in this matter.
Fixed an issue where adding new entrypoints to webpack.config.js caused them to not be recognized until cache was
cleared - which lead to confusing errors on occuring on templates files that included those entrypoints.
@lserwatka lserwatka merged commit 1a3fe33 into 3.1 Oct 2, 2020
@lserwatka lserwatka deleted the fix-encore-dev-cache branch October 2, 2020 14:26
@lserwatka
Copy link
Member

You can merge it up.

@adamwojs
Copy link
Member

adamwojs commented Oct 2, 2020

Done.

@dabrt
Copy link

dabrt commented Oct 5, 2020

@Steveb-p
Hi Paweł,
when creating a pull request, please always add a table that:

  • lists a Jira ticket that the commit originates from,
  • lists branches that the commit is intended for, and
  • provides a short description, incl. documentation input, if needed.

This will make the doc team's work easier.

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

Successfully merging this pull request may close these issues.

5 participants