PDA

View Full Version : [FIXED] Issue with exclude -all?



burnnat
8 Oct 2012, 12:30 PM
I'm using Sencha Cmd 3.0.0.190 and wanted to compile a small file to experiment with various build options. So to compile a file containing just a single class, I created a simple class:

Ext.define('Custom.Test', {
prop: 'value'
});

And compiled using this command, which I expected to only contain my Custom.Test class:

sencha compile -classpath ext/src,src exclude -all and include -class Custom.Test and concat test.js

To my surprise, though, the resulting file contained a host of Ext source files along with some other Custom.* classes in my src directory. So then I tried this command, which I expected to output just a blank file:

sencha compile -classpath ext/src,src exclude -all and concat test.js

However, the file still contained all the same classes as before. I also tried the following without any success (based on different usage examples found in 'sencha help compile' and the Sencha Cmd guides):

sencha compile -classpath ext/src,src exclude -a and concat test.js
sencha compile -classpath ext/src,src exclude --all and concat test.js
sencha compile -classpath ext/src,src exclude +all and concat test.js

I was able to eventually workaround the issue via named sets like this:

sencha compile -classpath ext/src,src save all and exclude all and concat test.js

Still, I would have expected the "exclude -all" to work. A bug, perhaps?

burnnat
9 Oct 2012, 12:21 PM
After further reading of the Sencha Cmd documentation, I now see that my original command:

sencha compile -classpath ext/src,src exclude -all and include -class Custom.Test and concat test.js

Should be equivalent to:

sencha compile -classpath ext/src,src union -class Custom.Test and concat test.js

Which works as expected. D'oh! :"> I suppose the fact that the "union" command isn't actually a set union threw me off. Given the function of the command, I think a name like "exactly" or "only" would be more natural (as in, "sencha compile only -namespace Custom" or "sencha compile exactly -class Custom.Test"). Be that as it may, it still looks like "exclude -all" isn't working as expected, though.

dongryphon
13 Oct 2012, 12:00 AM
Thanks for the report! I have opened a bug in our bug tracker.

dongryphon
13 Oct 2012, 12:05 AM
The reason we called the command "union" is that it accepts multiple parameters and produces as the current set the union of all those things. When used with just one criteria it is a bit hard to name I guess.