Skip to content
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

buildLocker issue #37

Closed
juliocbcotta opened this issue Mar 8, 2016 · 13 comments
Closed

buildLocker issue #37

juliocbcotta opened this issue Mar 8, 2016 · 13 comments
Labels

Comments

@juliocbcotta
Copy link
Contributor

Hi, I migrated to the new test configs and got this

 npm test

> Biva@ test /home/julio/git/platypus
> gulp --gulpfile test/gulpfile.ts --cwd ./ test

[18:20:21] Requiring external module ts-node/register
[18:20:24] Using gulpfile ~/git/platypus/test/gulpfile.ts
[18:20:24] Starting 'test'...
[18:20:24] Starting 'test.clean'...
[18:20:24] Deleted /home/julio/git/platypus/www/build/css, /home/julio/git/platypus/www/build/fonts, /home/julio/git/platypus/www/build/pages
[18:20:24] Finished 'test.clean' after 19 ms
[18:20:24] Starting 'test.build'...
[18:20:24] Starting 'test.lint'...
[18:20:24] Starting 'test.srcCount'...
[18:20:25] Finished 'test.srcCount' after 1.44 s
[18:20:26] Finished 'test.lint' after 1.83 s
[18:20:26] Starting 'test.build.html'...

∆ Copying HTML
√ Matching patterns: app/**/*.html
[18:20:26] Finished 'test.build.html' after 9.81 ms
[18:20:26] Starting 'test.build.fonts'...

∆ Copying fonts
√ Matching patterns: node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)
[18:20:26] Finished 'test.build.fonts' after 1.47 ms
[18:20:26] Starting 'test.build.sass'...

∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md|wp).scss
[18:20:26] Finished 'test.build.sass' after 3.55 ms
[18:20:26] Starting 'test.build.locker'...
[18:20:26] buildLocker: 0/13 fonts
[18:20:26] buildLocker: 0/3 sass
√ HTML copied to www/build
√ Fonts copied to www/build/fonts
[18:20:26] buildLocker: 22/11 html
[18:20:26] buildLocker: 0/3 sass
[18:20:26] buildLocker: 22/11 html
[18:20:26] buildLocker: 1/3 sass
√ Sass compilation complete
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 2/3 sass
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 22/11 html
[18:20:27] buildLocker: 22/11 html
[18:20:28] buildLocker: 22/11 html
[18:20:28] buildLocker: 22/11 html
[18:20:28] buildLocker: 22/11 html
[18:20:28] buildLocker: 22/11 html

and stays like this forever...
Any idea?

@juliocbcotta
Copy link
Contributor Author

I am using ionic beta 3 by the way...

@lathonez
Copy link
Owner

lathonez commented Mar 8, 2016

Is there a repo I can use to reproduce?

What's the output of this in your repo?

find app/ -name "*.html" | wc -l

@juliocbcotta
Copy link
Contributor Author

sorry, private repo.

find app/ -name "*.html" | wc -l                                                                                                                                  130 ↵
11

@lathonez
Copy link
Owner

lathonez commented Mar 8, 2016

Won't be able to help too much unless you can give me reproduction steps against this (or some other public repository) . It may be caused by changes in beta 3, will update tonight.

It looks like the HTML is getting counted twice or not being removed?

As a workaround change the logic here to be >= https://github.com/lathonez/clicker/blob/master/test/gulpfile.ts#L115

@juliocbcotta
Copy link
Contributor Author

I don't know if it matter, but the code seems to counting files by type, one other thing that is different is that my app.ts has inline root template:

<ion-nav [root]="rootPage"></ion-nav>

after change to >=

npm test                                                                                                                                                          130 ↵

> Biva@ test /home/julio/git/platypus
> gulp --gulpfile test/gulpfile.ts --cwd ./ test

[18:41:03] Requiring external module ts-node/register
[18:41:06] Using gulpfile ~/git/platypus/test/gulpfile.ts
[18:41:06] Starting 'test'...
[18:41:06] Starting 'test.clean'...
[18:41:06] Deleted /home/julio/git/platypus/www/build/css, /home/julio/git/platypus/www/build/fonts, /home/julio/git/platypus/www/build/pages
[18:41:06] Finished 'test.clean' after 23 ms
[18:41:06] Starting 'test.build'...
[18:41:06] Starting 'test.lint'...
[18:41:06] Starting 'test.srcCount'...
[18:41:07] Finished 'test.srcCount' after 1.51 s
[18:41:08] Finished 'test.lint' after 1.95 s
[18:41:08] Starting 'test.build.html'...

∆ Copying HTML
√ Matching patterns: app/**/*.html
[18:41:08] Finished 'test.build.html' after 9.91 ms
[18:41:08] Starting 'test.build.fonts'...

∆ Copying fonts
√ Matching patterns: node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)
[18:41:08] Finished 'test.build.fonts' after 1.52 ms
[18:41:08] Starting 'test.build.sass'...

∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md|wp).scss
[18:41:08] Finished 'test.build.sass' after 3.76 ms
[18:41:08] Starting 'test.build.locker'...
[18:41:08] buildLocker: 11/11 html
[18:41:08] buildLocker: 0/13 fonts
[18:41:08] buildLocker: 0/3 sass
√ HTML copied to www/build
√ Fonts copied to www/build/fonts
[18:41:08] buildLocker: 13/13 fonts
[18:41:08] buildLocker: 0/3 sass
[18:41:09] buildLocker: 13/13 fonts
[18:41:09] buildLocker: 1/3 sass
√ Sass compilation complete
[18:41:09] buildLocker: 13/13 fonts
[18:41:09] buildLocker: 2/3 sass
[18:41:09] buildLocker: 13/13 fonts
[18:41:09] buildLocker: 3/3 sass
[18:41:09] buildLocker: 13/13 fonts
[18:41:09] buildLocker: 3/3 sass
[18:41:09] buildLocker: 13/13 fonts
[18:41:09] buildLocker: 3/3 sass
[18:41:09] buildLocker: 13/13 fonts
[18:41:09] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:10] buildLocker: 13/13 fonts
[18:41:10] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:11] buildLocker: 13/13 fonts
[18:41:11] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:12] buildLocker: 13/13 fonts
[18:41:12] buildLocker: 3/3 sass
[18:41:13] buildLocker: 13/13 fonts
[18:41:13] buildLocker: 3/3 sass

@juliocbcotta
Copy link
Contributor Author

I need to go now, but I will come back to this tomorrow. Thanks

@lathonez
Copy link
Owner

lathonez commented Mar 8, 2016

ha, that was stupid. It's < not >==.

e.g. "If source is less than dest then the build can't have finished yet"

@lathonez
Copy link
Owner

lathonez commented Mar 8, 2016

I've upgraded to beta3 and can't replicate.

https://travis-ci.org/lathonez/clicker/builds/114641744

I've also taken a new ionic starter and applied the framework to that and can't replicate.

I am keen to get to the bottom of the issue but I won't be able to unless you can help me replicate it.

FYI the purpose of test.build.locker is:

  • we are using ionic build tools to build html, fonts and sass
  • ionic build tools are async but do not provide any callbacks

Thus test.build.locker attempts to naively determine whether or not the Ionic build has finished. This is the best method I could come up with.

@lathonez lathonez added the bug label Mar 9, 2016
@juliocbcotta
Copy link
Contributor Author

So, I think I found the problem. I removed my www/build/ and now it works.
Have you opened an issue at ionic-app-lib to make callbacks functions available?

@lathonez
Copy link
Owner

lathonez commented Mar 9, 2016

Does it work each time now? I don't really understand the problem.

Frankly I've been waiting for them to move to gulp. In my beta.3 they have a gulpfile but calling ionic build doesn't use it, it still uses ionic-app-lib, though the appropriate functions in gulp are present.

I had assumed that, when they move to gulp they would be changing ionic-app-lib further to call it instead.

It's tempting to try to invoke their gulp functions directly but I don't really want to until they are using them.

I'll open something somewhere and discuss it with them

@juliocbcotta
Copy link
Contributor Author

Yes, it builds each time now. Maybe the old build process left some trash in the build folder and the counting step was including it.
I will follow your topic there.
Thanks doc!

@lathonez
Copy link
Owner

lathonez commented Mar 9, 2016

sweet good news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants