Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[AssetMapper] Allowing circular references in JavaScriptImportPathCompiler#52323

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@weaverryan
Copy link
Member

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesNone
LicenseMIT

Hi!

In AssetMapper, we throw aCircularAssetsException if you ask for theapp.js asset, but it's still being created. This circular situation only happens via asset compilers: if, while compilingapp.js, we ask forother.js... and then while compiling that, we ask forapp.js.

However, JS modulesdo allow for circular references - e.g.app.js importsother.js which importsapp.js. Before this PR, this situation would trigger theCircularAssetsException. After, it is handled correctly.JavaScriptImportPathCompiler calls$assetMapper->getAsset() only to populate theMappedAsset.javaScriptImports property. So, allowing for the half-createdMappedAsset is safe here: we do not use any of the not-yet-populated properties.

Cheers!

@carsonbotcarsonbot added this to the6.4 milestoneOct 27, 2023
@weaverryanweaverryanforce-pushed theasset-mapper-allow-circular-workaround branch fromec9e073 to2f98cb3CompareOctober 27, 2023 18:47
@fabpot
Copy link
Member

Thank you@weaverryan.

@fabpotfabpotforce-pushed theasset-mapper-allow-circular-workaround branch from2f98cb3 tob0953a4CompareOctober 28, 2023 23:44
@fabpotfabpot merged commit2ccdfbc intosymfony:6.4Oct 28, 2023
@weaverryanweaverryan deleted the asset-mapper-allow-circular-workaround branchOctober 29, 2023 01:54
xabbuh added a commit that referenced this pull requestOct 29, 2023
This PR was merged into the 6.4 branch.Discussion----------[AssetMapper] Fixing merge| Q             | A| ------------- | ---| Branch?       | 6.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        | None| License       | MITFixing the merge of#52323,#52331 and#52349Also tested on a real project locally to verify the moving pieces :).Thanks!Commits-------99d5cbb [AssetMapper] Fixing merge from multiple PR's
This was referencedOct 29, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

3 participants

@weaverryan@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp