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
Angular CLI build optimization fails #243
Comments
Thanks for the great report @RyanHow. @jeromesimeon , I wonder if this is related to the whitespace issues that you mentioned since the Nearley upgrade? kach/nearley#413 @RyanHow can you share a link to an Angular issue if you have one, please? |
@mttrbrts That looks unrelated to me? The issue seems to be in |
This issue should be filed against https://github.com/hyperledger/composer-concerto |
Angular CLI issue is here I've worked around the Terser issue using a custom builder for angular and changing the options for Terser. I really think the build optimizer is a bug with Angular CLI. It shouldn't just hang indefinitely. |
So it looks like the issue is a trailing comma in a function call cicero-core\lib\logger.js line 98
Angular runs Terser with ecma=6. Apparently by default Terser runs with ecma=8 which allows the trailing comma. I'll keep following up the build optimizer hanging. |
Thanks @RyanHow for the follow up. I see that there are a number of other issues beyond this one in cicero-core alone,
I'll take a look at either transpiling or converting to ECMA 6/5 |
Really?
I just changed those single pieces of code and then it worked for me...
…On 19 Nov 2018, 4:43 pm, at 4:43 pm, Matt Roberts ***@***.***> wrote:
Thanks @RyanHow for the follow up.
I see that there are a number of other issues beyond this one in
cicero-core alone,
```
/Users/matt/dev/accordproject/cicero/packages/cicero-core/lib/logger.js
99:5 error Parsing error: Unexpected token )
/Users/matt/dev/accordproject/cicero/packages/cicero-core/lib/template.js
650:42 error Parsing error: Unexpected token =>
/Users/matt/dev/accordproject/cicero/packages/cicero-core/lib/templatelibrary.js
53:11 error Parsing error: Unexpected token clearCache
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/clause.js
36:82 error Parsing error: Unexpected token function
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/contract.js
33:97 error Parsing error: Unexpected token function
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/grammarvisitor.js
59:68 error Parsing error: Unexpected token =>
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/script.js
35:60 error Parsing error: Unexpected token function
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/scriptmanager.js
36:57 error Parsing error: Unexpected token function
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/template.js
35:7 error Parsing error: Unexpected token function
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/templateinstance.js
30:48 error Parsing error: Unexpected token function
/Users/matt/dev/accordproject/cicero/packages/cicero-core/test/templatelibrary.js
29:52 error Parsing error: Unexpected token function
```
I'll take a look at either transpiling or converting to ECMA 6/5
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#243 (comment)
|
Interesting, this is the output from my linter when downgrading the rules to ECMA 6. I'm happy to cut a release just with the change in logger.js, but I'm keen to fix the problem properly if there is a bigger issue. |
I only got it running through Terser with the default angular config. I'm not sure of implications of ECMA 6 compatibility overall sorry.
…On 19 Nov 2018, 4:57 pm, at 4:57 pm, Matt Roberts ***@***.***> wrote:
Interesting, this is the output from my linter when downgrading the
rules to ECMA 6.
I'm happy to cut a release just with the change in logger.js, but I'm
keen to fix the problem properly if there is a bigger issue.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#243 (comment)
|
Have a look at the comments on here
angular/angular-cli#12975 (comment)
Is any of that helpful?
…On 19 Nov 2018, 5:04 pm, at 5:04 pm, Ryan How ***@***.***> wrote:
I only got it running through Terser with the default angular config.
I'm not sure of implications of ECMA 6 compatibility overall sorry.
On 19 Nov 2018, 4:57 pm, at 4:57 pm, Matt Roberts
***@***.***> wrote:
>Interesting, this is the output from my linter when downgrading the
>rules to ECMA 6.
>
>I'm happy to cut a release just with the change in logger.js, but I'm
>keen to fix the problem properly if there is a bigger issue.
>
>--
>You are receiving this because you were mentioned.
>Reply to this email directly or view it on GitHub:
>#243 (comment)
|
Yes, thanks @RyanHow, that is helpful. Can you try again,
|
Yes! It's working now! Thanks! :) The build optimizer issue looks like a typescript parser issue... not sure of a workaround for that one. I'll file it on the typescript issue tracker and see if anything happens... |
Just a clarification in this issue: Transpilation of Cicero targets ES6 (or ECMA2015) not ES5. @RyanHow can we close this issue? |
Thanks. Yes you can close it.
Just to note: there is still a problem with the angular build optimizer, which is caused by a typescript issue.
So for the time being the build optimizer still needs to be disabled. Future versions of typescript should fix the issue.
…On 26 Jan 2019, 2:48 am, at 2:48 am, Jerome Simeon ***@***.***> wrote:
Just a clarification in this issue:
Transpilation of Cicero targets ES6 (or ECMA2015) *not* ES5.
@RyanHow can we close this issue?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#243 (comment)
|
Thanks. Closing this. |
Hi All,
I've been having trouble integrating Cicero into an Angular CLI project.
I'm having 2 separate issues.
The build hangs indefinitely on the composer-concerto\lib\introspect\parser.js file
If I disable the build optimizer, then the Terser minifier spits the dummy.
So the only way to get a successful production build is to disable the buildOptimizer and minifier, which is not ideal.
I'm just logging this issue here and will follow it up with the Angular CLI team.
You can reproduce this issue with the following steps
Using
cicero-core 0.9.6
angular 7.0.4
angular cli 7.0.6
The text was updated successfully, but these errors were encountered: