PDA

View Full Version : [OPEN] [3.0.0.250] Core classes being added despite exclude -tag core



mberrie
12 Nov 2012, 4:46 AM
EDIT: Meanwhile I tracked down the bug further. The problem is that when using "-debug=[true|false] concat", any exclude statements will be ignored. See post #3.

Sencha Cmd 3.0.0.250
ExtJs 4.1.1a
Win 7 x64
command: 'sencha compile'

Summary

Using 'sencha compile', ExtJs core classes are being added to the compiled output despite explicitly being excluded with 'exclude -tag core'. This worked correctly in 3.0.0.181

Test Case:
The output of the compiler script below will include several files from src/core which shouldn't be there because 'foundation' and 'core' are excluded via tags.



compile
-cl=extjs-4.1.1a/src,app/
union
-r
-c
myapp.Application
and
exclude
-tag
core
and
exclude
-tag
foundation
and
-debug=false
concat
-strip
-compress
build/all.min.js
and
metadata
-f
-o
build/all-dependencies.txt


Interestingly, it seems to work correctly if we drop the 'concat' and only use metadata. The resulting metadata file will **not** include files from 'src/core'.



compile
-cl=extjs-4.1.1a/src,classes
union
-r
-c
myapp.Application
and
exclude
-tag
core
and
exclude
-tag
foundation
and
metadata
-f
-o
build/all-dependencies.txt

Darren Pruitt
27 Nov 2012, 11:46 AM
I found if you use exclude -file ext/src it works.

mberrie
12 Dec 2012, 9:08 PM
@sencha

Can this pls be confirmed as a bug? It has been a month since the first report.

It seems that the entire '-tag' support is broken - not a minor glitch IMHO.

@Darren
thx for your help. Does that mean you can confirm the bug?

I am currently testing if exclude -f ext/src/core/src is equivalent to exclude -tag core,foundation.
We also use tags for excluding certain files from the production build - have to find a workaround for those as well.

mberrie
13 Dec 2012, 12:11 AM
I further tracked down the bug. Any 'exclude' command is ignored if the '-debug=xxx' option on the 'concat' command is used.

This does *not* work (Ext core and foundation classes will be included in the output)


compile union -r -c ClassA and exclude -tag core,foundation and -debug=true concat all.js and metadata -f -o dependencies.txt


This *does* work


compile union -r -c ClassA and exclude -tag core,foundation and concat all.js and metadata -f -o dependencies.txt


I found the exact same behavior when using a file path exclude (-f option).

Attached is a test project that show-cases the behavior. I excluded the ExtJs distro from the archive.

Run the build with 'sencha @test.sencha'

mberrie
21 Dec 2012, 8:29 AM
It is still not working for me in 3.0.1.283.

I can only assume that this bug is specific to my environment and not a general bug. Otherwise I don't understand why I don't get any official feedback.

I am very confused.

It would be very helpful if somebody could run the test setup and verify the behavior (if the bug can be confirmed or not)

Thx

dongryphon
26 Dec 2012, 4:58 PM
Thanks for the report! I have opened a bug in our bug tracker to see if we can track it down a bit. We use tagging internally so there is probably something special going on here.

mberrie
7 Jan 2013, 8:23 AM
Tested with 3.0.0.2.288, still same behavior.

This drives me crazy!

I did further tests to eliminate environment-specific issues - no change.
I also tried to make sense out of this using a 'trace' level log.

However, I think the observation that the compile output works without 'debug=xxx' option, but does not when 'debug=xxx' is added, should already be half the solution. Give me the Java source and I track it down myself /:)

stewardsencha
21 Jan 2013, 3:15 PM
This is urgent. I need a way to exclude a file and be damned sure of it.

Please post suggestions or workarounds for us dunces.

mberrie
24 Jan 2013, 9:05 PM
@Don
Don, thx for opening the bug report.

Please note that I tracked down the bug in my post from Dec 13 2012. My initial report didn't pin down the problem exactly and might lead your team in the wrong direction.
From your reply I am not sure whether you took notice of that.

@stewardsencha
Since there is still no helpful reply from Sencha, here is the work-around I found.

If you use a different syntax to configure the 'debug' switch, the excludes will work as expected. Use

-options=debug:false

This works:



compile -options=debug:false union -r -c ClassA and exclude -tag core,foundation and concat all.js and metadata -f -o dependencies.txt


The downside is that the -options argument can only be defined 'globally' for the entire compile statement.

In our project we use two concat statements to create both a production (minified, debug=false) and a 'debug' bundle (uncompressed, debug=true) in one compiler call. Since we can only specify a single -options flag that applies to all 'concat' actions in the compile statement, we currently have to strip 'debug' code from both the production and the debug bundle.