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

D3-color compiles incorrectly with buildOptimizer #16577

Closed
2 of 15 tasks
swordensen opened this issue Jan 8, 2020 · 3 comments
Closed
2 of 15 tasks

D3-color compiles incorrectly with buildOptimizer #16577

swordensen opened this issue Jan 8, 2020 · 3 comments

Comments

@swordensen
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Description

A clear and concise description of the problem...

D3-Color appears to miscompile when using the --aot=true flag or whenever using buildOptimizer.

🔬 Minimal Reproduction

( Someone from the thread on d3-color already made a reproducable example)

clone this project https://github.com/goldieswx/d3color-angular

Should you either serve it or build using the prod argument.
ng serve --prod
ng build --prod

Then the resulting app should crash with the OP stack trace

🔥 Exception or Error




ERROR TypeError: i.rgb is not a function
    at Tt (color.js.pre-build-optimizer.js:227)
    at n (rgb.js.pre-build-optimizer.js:10)
    at Wt (numberArray.js.pre-build-optimizer.js:8)
    at dr (continuous.js.pre-build-optimizer.js:30)
    at ks.p [as ramp] (continuous.js.pre-build-optimizer.js:85)
    at SVGPathElement. (index.ts:187)
    at SVGPathElement. (style.js.pre-build-optimizer.js:17)
    at dt.each (each.js.pre-build-optimizer.js:5)
    at dt.style (style.js.pre-build-optimizer.js:25)
    at ks.fillColors (index.ts:186)

🌍 Your Environment




Angular CLI: 8.0.6
Node: 10.13.0
OS: darwin x64
Angular: 8.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.6
@angular-devkit/build-angular     0.800.6
@angular-devkit/build-optimizer   0.800.6
@angular-devkit/build-webpack     0.800.6
@angular-devkit/core              8.0.6
@angular-devkit/schematics        8.0.6
@angular/cli                      8.0.6
@ngtools/webpack                  8.0.6
@schematics/angular               8.0.6
@schematics/update                0.800.6
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?

People already submitted an issue under d3-color but, the devs claimed it wasn't their problem. (link d3/d3-color#68). Considering that everything else works with buildOptimizer I don't really know if it's your problem either but, I figured you guys might be able to figure out what the issue is.

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@swordensen
Copy link
Author

Thank you!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants