Opened 12 years ago

Closed 12 years ago

#9748 closed defect (fixed)

[PATCH][CCLA]: hasResource regexp doesn't work in all cases.

Reported by: Jared Jurkiewicz Owned by: James Burke
Priority: high Milestone: 1.4
Component: BuildTools Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


Reported from a co-worker

The build utils currently look for dojo.provide("some.module") to add the hasResource checks around when building the code. The regular expression used to perform that check doesn't account for any spaces which may be present in source code and still be valid javascript.

The current reg exp doesn't find instances of this:

dojo . provide ( "some.module" ) ;

or even more commonly and likely

dojo.provide( "some.module" );

The only matches that the current reg exp finds must look like this:



This is the new regular expression that does account for spaces and correctly finds dojo.provide calls regardless of syntax and wraps them correctly with _hasResource checks.

buildUtil.guardProvideRegExpString = "dojo

Change History (2)

comment:1 Changed 12 years ago by James Burke

Milestone: tbd1.4

comment:2 Changed 12 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [19929]) Fixes #9748, allow for spaces for detection provide calls used for build guards.

Note: See TracTickets for help on using tickets.