WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#49144 closed enhancement (fixed)

Build Tools: do not include assets for JS dependencies that do not exist

Reported by: jeherve Owned by: gziolo
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.4
Component: Build/Test Tools Keywords: has-patch commit
Focuses: javascript Cc:

Description

This is a follow-up for #48154, where we started including *.asset.php files to declare package dependencies.

This works well but creates warnings in environments where the package does not exist because WordPress was not fully built. Could we bail in those scenarios and not try to include the file at all?

Attachments (2)

49144.diff (827 bytes) - added by jeherve 14 months ago.
49144-2.diff (837 bytes) - added by jeherve 14 months ago.
Ensure that we pass a full path

Download all attachments as: .zip

Change History (7)

@jeherve
14 months ago

#1 @swissspidy
14 months ago

I noticed that too when running unit tests against trunk in a plugin. Would be good to fix this, and the patch looks reasonable for that!

#2 @jeherve
14 months ago

Code is now also available at https://github.com/WordPress/wordpress-develop/pull/129 if needed to check Travis results.

Last edited 14 months ago by jeherve (previous) (diff)

@jeherve
14 months ago

Ensure that we pass a full path

#3 @gziolo
14 months ago

  • Keywords commit added
  • Owner set to gziolo
  • Status changed from new to assigned

It looks like a good enhancement if we want to allow running unit tests without having JS build files bootstrapped.

#4 @gziolo
14 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 47048:

Build Tools: do not include assets for JS dependencies that do not exist.

This is a follow-up for #48154, where we started including *.asset.php files to declare package dependencies.
This works well but creates warnings in environments where the package does not exist because WordPress was not fully built.

Props jeherve, swissspidy.

Fixes #49144.

#5 @gziolo
14 months ago

  • Milestone changed from Awaiting Review to 5.4
Note: See TracTickets for help on using tickets.