René's URL Explorer Experiment


Title: bug(build-optimizer): initial Map values are stripped unnecessarily · Issue #364 · angular/devkit · GitHub

Open Graph Title: bug(build-optimizer): initial Map values are stripped unnecessarily · Issue #364 · angular/devkit

X Title: bug(build-optimizer): initial Map values are stripped unnecessarily · Issue #364 · angular/devkit

Description: This code in the @angular/animations package gets compiled incorrectly when the build optimizer is turned on: // DO NOT REFACTOR ... keep the follow set instantiations // with the values intact (closure compiler for some reason // remove...

Open Graph Description: This code in the @angular/animations package gets compiled incorrectly when the build optimizer is turned on: // DO NOT REFACTOR ... keep the follow set instantiations // with the values intact (cl...

X Description: This code in the @angular/animations package gets compiled incorrectly when the build optimizer is turned on: // DO NOT REFACTOR ... keep the follow set instantiations // with the values intact (cl...

Opengraph URL: https://github.com/angular/devkit/issues/364

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(build-optimizer): initial Map values are stripped unnecessarily","articleBody":"[This code in the `@angular/animations` package](https://github.com/angular/angular/blob/master/packages/animations/browser/src/dsl/animation_transition_expr.ts#L68-L73) gets compiled incorrectly when the build optimizer is turned on:\r\n\r\n ```\r\n// DO NOT REFACTOR ... keep the follow set instantiations\r\n// with the values intact (closure compiler for some reason\r\n// removes follow-up lines that add the values outside of\r\n// the constructor...\r\nconst TRUE_BOOLEAN_VALUES = new Set\u003cstring>(['true', '1']);\r\nconst FALSE_BOOLEAN_VALUES = new Set\u003cstring>(['false', '0']);\r\n```\r\n\r\nWITHOUT optimization:\r\n\r\n```\r\nvar TRUE_BOOLEAN_VALUES = new Set();\r\nTRUE_BOOLEAN_VALUES.add('true');\r\nTRUE_BOOLEAN_VALUES.add('1');\r\nvar FALSE_BOOLEAN_VALUES = new Set();\r\nFALSE_BOOLEAN_VALUES.add('false');\r\nFALSE_BOOLEAN_VALUES.add('0');\r\n```\r\n\r\nWITH optimization:\r\n```\r\nvar TRUE_BOOLEAN_VALUES = new Set();\r\nvar FALSE_BOOLEAN_VALUES = new Set();\r\n```\r\n\r\nYou can see that the initialization is being stripped out causing animations that rely upon boolean values not to match, and so not run.\r\n\r\nThis use case was identified in the AIO application, where we wanted to use boolean based animation states.\r\n\r\n```\r\n animations: [\r\n    trigger('accordion', [\r\n      state('true', style({height: '*'})),\r\n      state('false', style({height: 0})),\r\n      transition('true => false', animate(250))\r\n    ])\r\n```\r\n\r\nYou could see the animations working without the optmizer `ng start --prod --build-optimizer=false` but as soon as you ran in production mode `ng start --prod` the animation was not matching and so not being played.\r\n\r\nWe worked around it by using string based animation states instead:\r\n\r\n```\r\n animations: [\r\n    trigger('accordion', [\r\n      state('show', style({height: '*'})),\r\n      state('hide', style({height: 0})),\r\n      transition('show => hide', animate(250))\r\n    ])\r\n```\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Area\r\n```\r\n- [x] devkit\r\n- [ ] schematics\r\n```\r\n\r\n### Versions\r\n\r\n* node: v8.9.4\r\n* OS: High Sierra\r\n* @angular-devkit/build-optimizer: 0.0.31\r\n","author":{"url":"https://github.com/petebacondarwin","@type":"Person","name":"petebacondarwin"},"datePublished":"2018-01-09T13:46:46Z","url":"https://github.com/angular/devkit/issues/364"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:92ecb3c9-4ccd-a39a-ec6c-8ffb47b4a36d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE780:1DCB8C:1B95195:245E085:6B014F05
html-safe-nonce5b46cac5c8ea8e90a1b4de85f4b5b7b01d9e497361c01fbc822dad4bea989050
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzgwOjFEQ0I4QzoxQjk1MTk1OjI0NUUwODU6NkIwMTRGMDUiLCJ2aXNpdG9yX2lkIjoiMjEwMjc2MDM4NjI0NzU5NTU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac853a4460a933bb0721d50e9c9aa4589b0fbb633b22d980aa8c87b6f2cf86920b
hovercard-subject-tagissue:287093795
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/devkit/364/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f5c30f5171651147b76b6d4d2bb4a41618bdab11bc4f6f9ea6122fcf4af0df2a/angular/devkit/issues/364
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f5c30f5171651147b76b6d4d2bb4a41618bdab11bc4f6f9ea6122fcf4af0df2a/angular/devkit/issues/364
og:image:altThis code in the @angular/animations package gets compiled incorrectly when the build optimizer is turned on: // DO NOT REFACTOR ... keep the follow set instantiations // with the values intact (cl...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepetebacondarwin
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/devkit git https://github.com/angular/devkit.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id88288940
octolytics-dimension-repository_nwoangular/devkit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id88288940
octolytics-dimension-repository_network_root_nwoangular/devkit
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/devkit/issues/364#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fdevkit%2Fissues%2F364
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fdevkit%2Fissues%2F364
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fdevkit
Reloadhttps://github.com/angular/devkit/issues/364
Reloadhttps://github.com/angular/devkit/issues/364
Reloadhttps://github.com/angular/devkit/issues/364
angularhttps://github.com/angular
devkithttps://github.com/angular/devkit
Codehttps://github.com/angular/devkit
Issueshttps://github.com/angular/devkit/issues
Pull requestshttps://github.com/angular/devkit/pulls
Actionshttps://github.com/angular/devkit/actions
Projectshttps://github.com/angular/devkit/projects
Security and qualityhttps://github.com/angular/devkit/security
Insightshttps://github.com/angular/devkit/insights
https://github.com/angular/devkit
bug(build-optimizer): initial Map values are stripped unnecessarilyhttps://github.com/angular/devkit/issues/364#top
https://github.com/filipesilva
comp: angular-devkit/build-optimizerhttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22comp%3A%20angular-devkit%2Fbuild-optimizer%22
severity3: brokenhttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
type: bughttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
workaround0: obvioushttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22workaround0%3A%20obvious%22
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issue-287093795
This code in the @angular/animations packagehttps://github.com/angular/angular/blob/master/packages/animations/browser/src/dsl/animation_transition_expr.ts#L68-L73
petebacondarwinhttps://github.com/petebacondarwin
type: bughttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
workaround0: obvioushttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22workaround0%3A%20obvious%22
severity3: brokenhttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
comp: angular-devkit/build-optimizerhttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22comp%3A%20angular-devkit%2Fbuild-optimizer%22
on Jan 9, 2018https://github.com/angular/devkit/issues/364#event-1415665814
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356311820
@IgorMinarhttps://github.com/IgorMinar
filipesilvahttps://github.com/filipesilva
on Jan 9, 2018https://github.com/angular/devkit/issues/364#event-1415857361
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356317099
TS Playgroundhttps://www.typescriptlang.org/play/#src=const%20TRUE_BOOLEAN_VALUES%20%3D%20new%20Set%3Cstring%3E(%5B'true'%2C%20'1'%5D)%3B%0D%0Aconst%20FALSE_BOOLEAN_VALUES%20%3D%20new%20Set%3Cstring%3E(%5B'false'%2C%20'0'%5D)%3B
https://github.com/clydin
clydinhttps://github.com/clydin
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356328215
angular/angular@661fdcdhttps://github.com/angular/angular/commit/661fdcd3e24ad000f1b54798520352ab2ec804c4
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356334907
…https://github.com/angular/devkit/issues/364
angular/angular@661fdcdhttps://github.com/angular/angular/commit/661fdcd3e24ad000f1b54798520352ab2ec804c4
#364 (comment)https://github.com/angular/devkit/issues/364#issuecomment-356328215
https://github.com/notifications/unsubscribe-auth/AAA9JymRlQlmXbtu_mtX2TImBnqQ2AJ7ks5tI43HgaJpZM4RX2S_https://github.com/notifications/unsubscribe-auth/AAA9JymRlQlmXbtu_mtX2TImBnqQ2AJ7ks5tI43HgaJpZM4RX2S_
https://github.com/IgorMinar
IgorMinarhttps://github.com/IgorMinar
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356342871
@petebacondarwinhttps://github.com/petebacondarwin
https://github.com/IgorMinar
IgorMinarhttps://github.com/IgorMinar
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356344402
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356358429
@IgorMinarhttps://github.com/IgorMinar
@clydinhttps://github.com/clydin
angular/angular@661fdcdhttps://github.com/angular/angular/commit/661fdcd3e24ad000f1b54798520352ab2ec804c4
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356359098
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Jan 9, 2018https://github.com/angular/devkit/issues/364#issuecomment-356359308
petebacondarwinhttps://github.com/petebacondarwin
completedhttps://github.com/angular/devkit/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 9, 2018https://github.com/angular/devkit/issues/364#event-1416150364
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/devkit/issues/364
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/devkit/issues/364
filipesilvahttps://github.com/filipesilva
comp: angular-devkit/build-optimizerhttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22comp%3A%20angular-devkit%2Fbuild-optimizer%22
severity3: brokenhttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
type: bughttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
workaround0: obvioushttps://github.com/angular/devkit/issues?q=state%3Aopen%20label%3A%22workaround0%3A%20obvious%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.