Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#45156 closed defect (bug) (fixed)

SCRIPT_DEBUG with 5.0 Beta 1 for Blocks Assets

Reported by: bordoni's profile bordoni Owned by: atimmer's profile 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:

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 5 years ago.
force-build-target.diff (2.0 KB) - added by atimmer 5 years ago.

Download all attachments as: .zip

Change History (20)

#1 @bordoni
5 years ago

  • Component changed from General to Build/Test Tools

Maybe that is a better component.

Last edited 5 years ago by bordoni (previous) (diff)

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


5 years ago

@atimmer
5 years ago

#3 @atimmer
5 years 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
5 years 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
5 years 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 5 years ago by bordoni (previous) (diff)

#6 @pento
5 years 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
5 years 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
5 years ago

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

Reopening for trunk.

#9 @ocean90
5 years 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
5 years ago

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

#11 @omarreiss
5 years ago

Looks good to me. Go for it @atimmer!

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


5 years ago

#13 @desrosj
5 years ago

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

#14 @pento
5 years ago

In 43886:

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

Props atimmer.
See #45156.

#15 @pento
5 years ago

  • Keywords fixed-5.0 added

#16 @desrosj
4 years 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
4 years ago

In 44245:

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

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

#18 @SergeyBiryukov
4 years ago

In 44246:

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

See #45156.

Note: See TracTickets for help on using tickets.