Skip to content

Builds cache keys are improperly composed #51

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

Merged
merged 2 commits into from
Mar 4, 2019

Conversation

webhdx
Copy link
Contributor

@webhdx webhdx commented Mar 4, 2019

Looks like ba327cd has an issue with builds configuration. I have my app configures to use multiple builds:

webpack_encore:
    output_path: "%kernel.project_dir%/web/assets/build"
    builds:
        custom_build: "%kernel.project_dir%/web/assets/custom_build/build"

which was failing on cache:clear:

In EntrypointLookup.php line 111:
                                                                                                                   
  [InvalidArgumentException]                                                                                       
  There was a problem JSON decoding the "/Users/maciejkobus/Projects/ezplatform/web/assets/custom_build/build" file  

To my understanding it is trying to parse directory as a JSON and indeed it looks like cache keys are improperly combined in the Extension class.

@webhdx
Copy link
Contributor Author

webhdx commented Mar 4, 2019

Looks like it duplicates #50.

@webhdx webhdx changed the title Invalid cache keys for builds Builds cache keys are improperly composed Mar 4, 2019
@weaverryan
Copy link
Member

Thanks @webhdx! This was a duplicate of #50, but I merged both because I liked your use of the private const. Cheers!

@weaverryan weaverryan merged commit 7f6e111 into symfony:master Mar 4, 2019
weaverryan added a commit that referenced this pull request Mar 4, 2019
This PR was squashed before being merged into the master branch (closes #51).

Discussion
----------

Builds cache keys are improperly composed

Looks like ba327cd has an issue with `builds` configuration. I have my app configures to use multiple builds:
```yaml
webpack_encore:
    output_path: "%kernel.project_dir%/web/assets/build"
    builds:
        custom_build: "%kernel.project_dir%/web/assets/custom_build/build"
```

which was failing on `cache:clear`:
```
In EntrypointLookup.php line 111:

  [InvalidArgumentException]
  There was a problem JSON decoding the "/Users/maciejkobus/Projects/ezplatform/web/assets/custom_build/build" file
```

To my understanding it is trying to parse directory as a JSON and indeed it looks like cache keys are improperly combined in the Extension class.

Commits
-------

7f6e111 Merge branch 'master' into multiple_builds_cache_keys
b22f685 Fixed issue with invalid cache keys for builds
@lserwatka
Copy link

@weaverryan could you make a new release tag on this package?

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.

6 participants