Opened 7 years ago

Closed 6 years ago

#16106 closed defect (worksforme)

Build-System: Cannot skip unwanted subfolders/ Unclear how to skip unwanted subfolders

Reported by: Paul Christopher Owned by: Rawld Gill
Priority: undecided Milestone: 1.9
Component: BuildSystem Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

Description

If a Dojo project is put under CVS version control, the build fails due to the added hidden CVS subfolders, see

http://dojo-toolkit.33424.n3.nabble.com/Dojo-Build-How-to-ignore-specific-folders-and-their-files-td3990203.html

http://dojo-toolkit.33424.n3.nabble.com/dojo-build-cvs-problem-td3989463.html

http://dojo-toolkit.33424.n3.nabble.com/custom-build-issue-and-using-source-control-td3985712.html#a3985721

The error message is rather meaningless:

processing profile resource C:/Daten/SunnyCars/B2BL_DoJo_Head/B2BL_DoJo/B2BL/Scr
ipts/B2BL/app.profile.js
info(107) Package Version: package: dojox; version: 1.8.0
processing profile resource C:/Daten/SunnyCars/B2BL_DoJo_Head/B2BL_DoJo/B2BL/Scr
ipts/dojox/dojox.profile.js
info(107) Package Version: package: dijit; version: 1.8.0
processing profile resource C:/Daten/SunnyCars/B2BL_DoJo_Head/B2BL_DoJo/B2BL/Scr
ipts/dijit/dijit.profile.js
info(107) Package Version: package: B2BL; version: 1
processing profile resource C:/Daten/SunnyCars/B2BL_DoJo_Head/B2BL_DoJo/B2BL/Scr
ipts/B2BL/app.profile.js
info(107) Package Version: package: dojo; version: 1.8.0
processing profile resource C:/Daten/SunnyCars/B2BL_DoJo_Head/B2BL_DoJo/B2BL/Scr
ipts/dojo/dojo.profile.js
discovering resources...
starting reading resources...
starting processing raw resource content...
starting tokenizing resource...
starting processing resource tokens...
starting parsing resource...
starting processing resource AST...
warn(216) dojo/has plugin resource could not be resolved during build-time. plug
in resource id: touch?dojox/gesture/tap; reference module id: dojox/treemap/Dril
lDownUp
warn(224) A plugin dependency was encountered but there was no build-time plugin
 resolver. module: dojox/mobile/TimePicker; plugin: dojox/mobile/_PickerChooser
warn(224) A plugin dependency was encountered but there was no build-time plugin
 resolver. module: dojox/mobile/DatePicker; plugin: dojox/mobile/_PickerChooser
warn(216) dojo/has plugin resource could not be resolved during build-time. plug
in resource id: dojo-parser?:dojo/_base/window; reference module id: dojox/mvc/p
arserExtension
warn(216) dojo/has plugin resource could not be resolved during build-time. plug
in resource id: dojo-mobile-parser?:dojo/parser; reference module id: dojox/mvc/
parserExtension
warn(216) dojo/has plugin resource could not be resolved during build-time. plug
in resource id: dojo-parser?:dojox/mobile/parser; reference module id: dojox/mvc
/parserExtension
js: "<eval'ed string>#1(Function)#1(eval)", line 406: uncaught JavaScript runtim
e exception: TypeError: Cannot read property "1" from null
        at <eval'ed string>#1(Function)#1(eval):406
        at <eval'ed string>#1(Function)#1(eval):611
        at <eval'ed string>#1(Function)#1(eval):127
        at <eval'ed string>#1(Function)#1(eval):178
        at <eval'ed string>#1(Function)#1(eval):178
        at <eval'ed string>#1(Function)#1(eval):279
        at <eval'ed string>#1(Function)#1(eval):249 (doBuild)
        at <eval'ed string>#1(Function)#1(eval):284
        at <eval'ed string>#1(Function)#1(eval):84

Adding a trees property to app.profile.js has no effect:

trees: [
    [ ".", ".", /(\/\.)|(~$)|(CVS)/ ]
] 

Request

1) Could a working example for the trees property be added to a sample built profile/ the documentation? The trees property should always ignore subfolders called "CVS" regardeless in which tree. CVS adds the folder to every directory.

2) If the build system does not support a generic ignore list (i.e. "ignore all subfolders called CVS whereever you encounter them"), could this please be added to the build system?

Discusssion

Since the above questions have never been answered on the interest mailing list, I ask the question now on the bug tracker. It took us quite some time to figure out the reason why the build fails. The error message was not helpful in spotting the exact reason.

Our current workaround is to run the build in a separate directory. Before building, we need to delete all CVS subfolders by a simple batch file:

for /d /r . %d in (CVS) do @if exist "%d" rd /s /q "%d"

Change History (4)

comment:1 Changed 7 years ago by tsemachh

We are having same issue with Dojo build in 1.8 with CVS. The only workaround now is to remove the CVS Folders which makes build longer. I think it should be handled in top priority as many people work with CVS.

comment:2 Changed 7 years ago by hkelsey

I'm facing the same issue on 1.8.3 with CVS, is anyone actually looking into this as there's been no activity for 3months?

comment:3 Changed 7 years ago by Rawld Gill

Milestone: tbd1.9
Status: newassigned

comment:4 Changed 6 years ago by Rawld Gill

Resolution: worksforme
Status: assignedclosed

Hi Paul,

You were quite close to the solution. The global trees build control variable does not affect a packages excludes. Instead, you need to modify the package trees variable. Let's look at a couple of examples.

First, let's say I've got some package with a profile, then all I need to do is add the trees property exactly as you've indicated above to that profile:

somePackage.profile.js:

// note: I use the following pattern to write profiles so I can use the full power 
// of JavaScript to construct the profile object

var profile = (function(){
  return {
    // non-package stuff, if any...
    packages:[{
      name:"somePackage",
      // etc.
      trees:[[".", ".", /(\/\.)|(^\.)|(~$)|(CVS)/]]
    }]
  };
})();

Next, let's consider a slightly tougher situation. Say you want to modify the trees property in a package profile for which there is already a profile that you don't want to modify. To drive this home, consider trying to keep the "CVS" tree out of the dijit package (assume you have one there for some reason). So, what we want to do is use but modify the stock dijit profile. This require two steps:

  1. Construct a custom profile
  2. Ensure both profiles are processed.

Here's a custom profile that would do the job:

var profile = (function(){
  return {
    packages:[{
      name:"dijit",
      trees:[[".", ".", /(\/\.)|(^\.)|(~$)|(CVS)/]]
    }]
  };
})();

Notice there is very little in the profile...only the variable we want to modify.

Now, you can use it like this:

$ ./build.sh --package ../../dojo --package ../../dijit -p ../../dijit/myDijit -r

The builder will "mix" the myDijit profile with the profile implied by "--package ../../dijit".

When I tested this to make sure it worked, I put myDijit in the dijit dir (as indicated above), but it could go anywhere.

Hope that helps.

Note: See TracTickets for help on using tickets.