New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`ts run -u` : update option send only update files, But alloy compiles all files. #388

Closed
yomybaby opened this Issue Jan 9, 2015 · 19 comments

Comments

Projects
None yet
6 participants
@yomybaby
Collaborator

yomybaby commented Jan 9, 2015

I love ts @ run -u command! Because it's so fast to check out changes.

But these day I feel that it's much slower than before.

Alloy compiler make all file even there is -u option.

see below log: I just change reservation.xml file. But Alloy compiles all files & optimizes all files.

[DEBUG] changed: /Users/yomybaby/Documents/TiWorkspace/sss/app/views/reservation.xml
[INFO] Beginning Build Process
[INFO] Compiling Alloy for ios
[INFO]  [config.json] regenerating CFG.js from config.json...
[INFO] ----- MVC GENERATION -----
[INFO] [global style] loading from cache...
[INFO] [day.xml] yo.calendar view processing...
[INFO]   style:      "day.tss"
[INFO]   view:       "day.xml"
[INFO]   created:    "Resources/iphone/alloy/widgets/yo.calendar/controllers/day.js"
[INFO]   created:     "Resources/iphone/alloy/widgets/yo.calendar/styles/day.js"
[INFO] [widget.xml] yo.calendar view processing...
[INFO]   style:      "widget.tss"
[INFO]   view:       "widget.xml"
[INFO]   controller: "widget.js"
[INFO]   created:    "Resources/iphone/alloy/widgets/yo.calendar/controllers/widget.js"
[INFO]   created:     "Resources/iphone/alloy/widgets/yo.calendar/styles/widget.js"
[INFO] [history.xml] view processing...
[INFO]   style:      "history.tss"
[INFO]   view:       "history.xml"
[INFO]   controller: "history.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/history.js"
[INFO]   created:     "Resources/iphone/alloy/styles/history.js"
[INFO] [index.xml] view processing...
[INFO]   style:      "index.tss"
[INFO]   view:       "index.xml"
[INFO]   controller: "index.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/index.js"
[INFO]   created:     "Resources/iphone/alloy/styles/index.js"
[INFO] [main.xml] view processing...
[INFO]   style:      "main.tss"
[INFO]   view:       "main.xml"
[INFO]   controller: "main.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/main.js"
[INFO]   created:     "Resources/iphone/alloy/styles/main.js"
[INFO] [menu.xml] view processing...
[INFO]   style:      "menu.tss"
[INFO]   view:       "menu.xml"
[INFO]   controller: "menu.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/menu.js"
[INFO]   created:     "Resources/iphone/alloy/styles/menu.js"
[INFO] [notice.xml] view processing...
[INFO]   style:      "notice.tss"
[INFO]   view:       "notice.xml"
[INFO]   controller: "notice.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/notice.js"
[INFO]   created:     "Resources/iphone/alloy/styles/notice.js"
[INFO] [point.xml] view processing...
[INFO]   style:      "point.tss"
[INFO]   view:       "point.xml"
[INFO]   controller: "point.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/point.js"
[INFO]   created:     "Resources/iphone/alloy/styles/point.js"
[INFO] [reservation.xml] view processing...
[INFO]   style:      "reservation.tss"
[INFO]   view:       "reservation.xml"
[INFO]   controller: "reservation.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/reservation.js"
[INFO]   created:     "Resources/iphone/alloy/styles/reservation.js"
[INFO] [setting.xml] view processing...
[INFO]   style:      "setting.tss"
[INFO]   view:       "setting.xml"
[INFO]   controller: "setting.js"
[INFO]   created:    "Resources/iphone/alloy/controllers/setting.js"
[INFO]   created:     "Resources/iphone/alloy/styles/setting.js"
[INFO] 
[INFO] [app.js] using cached app.js...
[INFO] 
[INFO] ----- OPTIMIZING -----
[INFO] - alloy/moment.js
[INFO] - iphone/alloy.js
[INFO] - iphone/colors.js
[INFO] - iphone/moment.i18n.js
[INFO] - iphone/q.js
[INFO] - iphone/xp.ui.js
[INFO] - iphone/yo.ui.js
[INFO] - iphone/alloy/moment.js
[INFO] - iphone/alloy/sync/localStorage.js
[INFO] - iphone/alloy/sync/properties.js
[INFO] - iphone/alloy/sync/sql.js
[INFO] - iphone/alloy/widgets/yo.calendar/controllers/day.js
[INFO] - iphone/alloy/widgets/yo.calendar/controllers/widget.js
[INFO] - iphone/alloy/widgets/yo.calendar/styles/day.js
[INFO] - iphone/alloy/widgets/yo.calendar/styles/widget.js
[INFO] 
[INFO] Alloy compiled in 4.91001s
[INFO] 1 file(s) bundled.
[INFO] Uploading...
OK[INFO] [iphone, 8.1, 172.30.22.1] Unpacking new bundle:
@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Jan 9, 2015

Owner

Yep. This is a known issue and it is a limitation with alloy.
BUT - you can do it. (Sort of).

Read this blog post by @xavierlacot.

The PR was just merged: appcelerator/alloy#625
According the JIRA its due for Alloy 1.7.0.

Xavier does it with a nifty grunt file (which I've used), but once the change is in an official release, I'll updated tishadow.

(There are cases where it doesn't work and a full alloy compilation is necessary, but we'll take care of those cases.)

Owner

dbankier commented Jan 9, 2015

Yep. This is a known issue and it is a limitation with alloy.
BUT - you can do it. (Sort of).

Read this blog post by @xavierlacot.

The PR was just merged: appcelerator/alloy#625
According the JIRA its due for Alloy 1.7.0.

Xavier does it with a nifty grunt file (which I've used), but once the change is in an official release, I'll updated tishadow.

(There are cases where it doesn't work and a full alloy compilation is necessary, but we'll take care of those cases.)

@yomybaby

This comment has been minimized.

Show comment
Hide comment
@yomybaby

yomybaby Jan 9, 2015

Collaborator

Cool!! 👍

Collaborator

yomybaby commented Jan 9, 2015

Cool!! 👍

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 5, 2015

Owner

All done. For this to work today you need to use:

  • alloy from master - the merged change from @xavierlacot isn't in production.
  • tishadow from master - haven't released this change either.
  • use the ts config --boost command to turn on selective compilation for watched (@) changes.

If you are using another build system, run and spec now support the -f or --alloy-compile-file <filename> flag to selectively compile an alloy file.

Owner

dbankier commented Feb 5, 2015

All done. For this to work today you need to use:

  • alloy from master - the merged change from @xavierlacot isn't in production.
  • tishadow from master - haven't released this change either.
  • use the ts config --boost command to turn on selective compilation for watched (@) changes.

If you are using another build system, run and spec now support the -f or --alloy-compile-file <filename> flag to selectively compile an alloy file.

@yomybaby

This comment has been minimized.

Show comment
Hide comment
@yomybaby

yomybaby Feb 5, 2015

Collaborator

Cool!! Thanks.

Collaborator

yomybaby commented Feb 5, 2015

Cool!! Thanks.

@xavierlacot

This comment has been minimized.

Show comment
Hide comment
@xavierlacot

xavierlacot commented Feb 5, 2015

👍 @dbankier, thanks!

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 5, 2015

Owner

Thanks @xavierlacot, it is mostly your work on the alloy side, I'm just hooking into it.

Owner

dbankier commented Feb 5, 2015

Thanks @xavierlacot, it is mostly your work on the alloy side, I'm just hooking into it.

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 6, 2015

Owner

FWIW - here is how JAST uses it in its Gruntfile.
https://github.com/dbankier/JAST/blob/master/Gruntfile.js

Owner

dbankier commented Feb 6, 2015

FWIW - here is how JAST uses it in its Gruntfile.
https://github.com/dbankier/JAST/blob/master/Gruntfile.js

@jkotchoff

This comment has been minimized.

Show comment
Hide comment
@jkotchoff

jkotchoff Feb 6, 2015

Hey, wow, awesome!

I just updated our JAST stack to your new one @dbankier and noticed that TiShadow is now flying through the alloy stuff but still taking about 12 seconds to process a list of all the javascript files under the '----- OPTIMIZING -----' heading in the log output
ie.

...
[INFO] [components/security.xml] view processing...
[INFO]   Not matching the file restriction, skipping
[INFO] [tablet/securities.xml] view processing...
[INFO]   Not matching the file restriction, skipping
[INFO] [article_fullscreen.js] controller processing...
[INFO]   controller: "article_fullscreen.js"
[INFO]   created:    "Resources/android/alloy/controllers/article_fullscreen.js"
[INFO]   created:     "Resources/android/alloy/styles/article_fullscreen.js"
[INFO] 
[INFO] ----- OPTIMIZING -----
[INFO] - android/alloy.js
[INFO] - android/alloy/moment.js
[INFO] - android/alloy/models/Article.js
[INFO] - android/alloy/models/Dividend.js
[INFO] - android/alloy/models/Education_category.js
[INFO] - android/alloy/models/Filtered_security.js
[INFO] - android/alloy/models/Market_sector.js
...

Is anyone else experiencing this and does it ring a bell as something that can be disabled or sped up with configuration somewhere?

jkotchoff commented Feb 6, 2015

Hey, wow, awesome!

I just updated our JAST stack to your new one @dbankier and noticed that TiShadow is now flying through the alloy stuff but still taking about 12 seconds to process a list of all the javascript files under the '----- OPTIMIZING -----' heading in the log output
ie.

...
[INFO] [components/security.xml] view processing...
[INFO]   Not matching the file restriction, skipping
[INFO] [tablet/securities.xml] view processing...
[INFO]   Not matching the file restriction, skipping
[INFO] [article_fullscreen.js] controller processing...
[INFO]   controller: "article_fullscreen.js"
[INFO]   created:    "Resources/android/alloy/controllers/article_fullscreen.js"
[INFO]   created:     "Resources/android/alloy/styles/article_fullscreen.js"
[INFO] 
[INFO] ----- OPTIMIZING -----
[INFO] - android/alloy.js
[INFO] - android/alloy/moment.js
[INFO] - android/alloy/models/Article.js
[INFO] - android/alloy/models/Dividend.js
[INFO] - android/alloy/models/Education_category.js
[INFO] - android/alloy/models/Filtered_security.js
[INFO] - android/alloy/models/Market_sector.js
...

Is anyone else experiencing this and does it ring a bell as something that can be disabled or sped up with configuration somewhere?

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 6, 2015

Owner

@jkotchoff, just fixed that in JAST. (You were getting a false positive.)

Have a look at the readme file. You need to set boost to true in the Gruntfile.js there to turn this feature on.

Owner

dbankier commented Feb 6, 2015

@jkotchoff, just fixed that in JAST. (You were getting a false positive.)

Have a look at the readme file. You need to set boost to true in the Gruntfile.js there to turn this feature on.

@yomybaby

This comment has been minimized.

Show comment
Hide comment
@yomybaby

yomybaby Feb 6, 2015

Collaborator

It skips MVC GENERATION properly, But it still optimize all js files.
It looks like a bug of alloy master version.

Collaborator

yomybaby commented Feb 6, 2015

It skips MVC GENERATION properly, But it still optimize all js files.
It looks like a bug of alloy master version.

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 6, 2015

Owner

@yomybaby, that happens when you tell it to compile a file that does not exist. In JAST I was passing "false" when boost was turned off. That is fixed.

Owner

dbankier commented Feb 6, 2015

@yomybaby, that happens when you tell it to compile a file that does not exist. In JAST I was passing "false" when boost was turned off. That is fixed.

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 6, 2015

Owner

Actually that doesn't make sense according to that trace. It skips optimisation for me. I will have look later.

Owner

dbankier commented Feb 6, 2015

Actually that doesn't make sense according to that trace. It skips optimisation for me. I will have look later.

@yomybaby

This comment has been minimized.

Show comment
Hide comment
@yomybaby

yomybaby Feb 6, 2015

Collaborator

I solved this problem and make PR to alloy. : appcelerator/alloy#661

There is a restrictionPath missing when call parseAlloyComponent for controller that has no correcpoding view markup.

Collaborator

yomybaby commented Feb 6, 2015

I solved this problem and make PR to alloy. : appcelerator/alloy#661

There is a restrictionPath missing when call parseAlloyComponent for controller that has no correcpoding view markup.

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 6, 2015

Owner

Great!
On 06/02/2015 5:54 pm, "Jong Eun Lee" notifications@github.com wrote:

I solved this problem and make PR to alloy. : appcelerator/alloy#661
appcelerator/alloy#661

There is a restrictionPath missing when call parseAlloyComponent for controller
that has no correcpoding view markup.


Reply to this email directly or view it on GitHub
#388 (comment).

Owner

dbankier commented Feb 6, 2015

Great!
On 06/02/2015 5:54 pm, "Jong Eun Lee" notifications@github.com wrote:

I solved this problem and make PR to alloy. : appcelerator/alloy#661
appcelerator/alloy#661

There is a restrictionPath missing when call parseAlloyComponent for controller
that has no correcpoding view markup.


Reply to this email directly or view it on GitHub
#388 (comment).

@casevictor

This comment has been minimized.

Show comment
Hide comment
@casevictor

casevictor Feb 12, 2015

So much great!

casevictor commented Feb 12, 2015

So much great!

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 12, 2015

Owner

ts 2.8.0 released to support this.
you still need the ts config --boost to turn it on.

Owner

dbankier commented Feb 12, 2015

ts 2.8.0 released to support this.
you still need the ts config --boost to turn it on.

@nuno

This comment has been minimized.

Show comment
Hide comment
@nuno

nuno Feb 12, 2015

Hey @dbankier if I turn boost on ts config --boost this feature work well on express?
ex. ti build -p ios --shadow

nuno commented Feb 12, 2015

Hey @dbankier if I turn boost on ts config --boost this feature work well on express?
ex. ti build -p ios --shadow

@dbankier

This comment has been minimized.

Show comment
Hide comment
@dbankier

dbankier Feb 12, 2015

Owner

It should. Make sure you are using alloy from master.

Owner

dbankier commented Feb 12, 2015

It should. Make sure you are using alloy from master.

@nuno

This comment has been minimized.

Show comment
Hide comment
@nuno

nuno commented Feb 12, 2015

Thanks @dbankier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment