WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 11 months ago

Last modified 11 months ago

#45156 closed defect (bug) (fixed)

SCRIPT_DEBUG with 5.0 Beta 1 for Blocks Assets

Reported by: bordoni Owned by: atimmer
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: Build/Test Tools Keywords: has-patch commit fixed-5.0
Focuses: javascript Cc:
PR Number:

Description

When I have SCRIPT_DEBUG as true to allow better debugging for the Blocks Editor compatibility for plugin development I get 404 to all of the assets related to the Blocks editor, I am almost sure it's due to the ZIP only shipping with the minified Version of the JS assets.

Attachments (2)

45156.diff (279 bytes) - added by atimmer 12 months ago.
force-build-target.diff (2.0 KB) - added by atimmer 12 months ago.

Download all attachments as: .zip

Change History (20)

#1 @bordoni
12 months ago

  • Component changed from General to Build/Test Tools

Maybe that is a better component.

Last edited 12 months ago by bordoni (previous) (diff)

This ticket was mentioned in Slack in #core-js by pento. View the logs.


12 months ago

@atimmer
12 months ago

#3 @atimmer
12 months ago

45156.diff adds webpack:dev to grunt build. When I put webpack:dev before webpack:prod I was treated with this error:

Warning: Circular reference detected (.dev[1].plugins[3].compiler.inputFileSystem._statStorage.interval._idlePrev._idleNext) Use --force to continue.

So I've put dev behind prod.

PS. I expect the error to be harmless, but caused by the fact that grunt is all one process and webpack doesn't play nice with this. If we ever want to change the order we can shell out to webpack using grunt-shell to make sure webpack is in it's own process.

#4 @atimmer
12 months ago

  • Owner set to atimmer
  • Resolution set to fixed
  • Status changed from new to closed

In 43817:

Build tools: Build webpack dev in grunt build.

For the WordPress zip we need both the minified and non-minified files. This is because of SCRIPT_DEBUG. So in grunt build we need to do both grunt webpack:prod and grunt webpack:dev.

Props bordoni.
Fixes #45156.

#5 @bordoni
12 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

As reported by @pento here https://wordpress.slack.com/archives/C5UNMSU4R/p1540375682000100

The commit above didn't seem to fix the problem.

Last edited 12 months ago by bordoni (previous) (diff)

#6 @pento
12 months ago

As this isn't building as expected, I've asked Systems to help investigate.

@atimmer: As a workaround, in case we can't get the build working correctly in time for beta 1, could you prepare a patch that causes the dist and vendor JS to always load the .min.js versions? That'll at least stop the 404s until we can investigate further.

#7 @pento
12 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Resolution set to fixed
  • Status changed from reopened to closed

There was a bit of a delayed effect in the build server recognising @atimmer's fix. 🙂

I've updated the nightly build, it now includes the unminified files.

http://wordpress.org/nightly-builds/wordpress-5.0-latest.zip

#8 @SergeyBiryukov
12 months ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for trunk.

#9 @ocean90
12 months ago

  • Keywords needs-patch added; fixed-5.0 removed

Can we make sure that there is no delay?

The packages were updated in [43861] which only updated the minified files in build-43690. The next unrelated commit [43862] also updated the dev files, see build-43691.

#10 @atimmer
12 months ago

@ocean90 force-build-target.diff fixes this. @omarreiss or @pento can you sign off on that patch?

#11 @omarreiss
12 months ago

Looks good to me. Go for it @atimmer!

This ticket was mentioned in Slack in #core-editor by netweb. View the logs.


12 months ago

#13 @desrosj
12 months ago

  • Keywords has-patch commit added; needs-patch removed

#14 @pento
12 months ago

In 43886:

Build Tools: Add non-minified @wordpress scripts to the build output.

Props atimmer.
See #45156.

#15 @pento
12 months ago

  • Keywords fixed-5.0 added

#16 @desrosj
11 months ago

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

In 44161:

Build tools: Build webpack dev in grunt build.

For the WordPress zip we need both the minified and non-minified files. This is because of SCRIPT_DEBUG. So in grunt build we need to do both grunt webpack:prod and grunt webpack:dev.

Props bordoni, atimmer.

Merges [43817] to trunk.

Fixes #45156.

#17 @SergeyBiryukov
11 months ago

In 44245:

Build Tools: Add non-minified @wordpress scripts to the build output.

Props atimmer.
Merges [43886] to trunk.
See #45156.

#18 @SergeyBiryukov
11 months ago

In 44246:

Build Tools: Revert unrelated changes to Gruntfile.js added in [44245].

See #45156.

Note: See TracTickets for help on using tickets.