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

Heap issues in latest 6.1.9 #4304

Closed
eMerzh opened this issue May 6, 2024 · 3 comments
Closed

Heap issues in latest 6.1.9 #4304

eMerzh opened this issue May 6, 2024 · 3 comments

Comments

@eMerzh
Copy link
Contributor

eMerzh commented May 6, 2024

Environment

System:

  • OS: macOS 14.4.1
  • CPU: (8) arm64 Apple M2
  • Memory: 98.77 MB / 24.00 GB
  • Shell: 5.9 - /bin/zsh

Binaries:

  • Node: 21.7.3 - /opt/homebrew/bin/node
  • Yarn: 1.22.22 - /opt/homebrew/bin/yarn
  • npm: 10.5.0 - /opt/homebrew/bin/npm
  • pnpm: 9.0.6 - /opt/homebrew/bin/pnpm
  • Watchman: 2024.04.22.00 - /opt/homebrew/bin/watchman

npmPackages:

  • styled-components: 6.1.9 => 6.1.9

Reproduction

Steps to reproduce

just install new version, heap explode 💥

tsc --noEmit --generateTrace dir
npx @typescript/analyze-trace dir

seems to report a lot of stuff, not sure yet how to interpret them (nothing was reported before)

a small extract

Hot Spots
├─ Check file /code/src/modules/app/routeconfig/settings/routes/integrations/components/microsoftteamstokeninfo.jsx (1865ms)
│  └─ Check deferred node from (line 35, char 5) to (line 35, char 79) (1860ms)
│     └─ Compare types 29468 and 1509130 (1713ms)
│        ├─ {"id":29468,"kind":"StringLiteral","value":"\"aria-autocomplete\""}
│        └─ {"id":1509130,"kind":"IndexType","keyofType":1509129}
│           └─ {"id":1509129,"kind":"ConditionalType","conditionalCheckType":1509128,"conditionalExtendsType":32440,"conditionalTrueType":1509132,"conditionalFalseType":38}
│              ├─ {"id":1509128,"kind":"TypeParameter","name":"AsTarget","location":{"path":"/code/node_modules/styled-components/dist/types.d.ts","line":133,"char":6}}
│              ├─ {"id":32440,"kind":"AliasedUnion","name":"KnownTarget","count":136,"types":[60,153,627,642,644,648,650,693,699,956,1099,1105,1244,1703,2974,3496,3510,3548,3708,3743,5939,5940,6854,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876,6877,6878,6879,6880,6881,6882,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894,6896,6897,6898,6899,6900,6901,6902,6903,6904,6905,6906,6907,6908,6909,6910,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6930,6931,6932,6933,6934,6935,6937,6938,6939,6940,6941,6943,6944,6945,6946,6947,7299,11437,19441,19442,19443,19444,19470,19471,19472,19473,19474,19475,19476,19479,19480,19481,19482,19483,19485,19488,19489,23865,23868,32438],"location":{"path":"/code/node_modules/styled-components/dist/types.d.ts","line":28,"char":1}}
│              │  ├─ {"id":60,"kind":"StringLiteral","value":"\"object\""}
│              │  ├─ {"id":153,"kind":"StringLiteral","value":"\"video\""}
│              │  ├─ {"id":627,"kind":"StringLiteral","value":"\"big\""}
│              │  ├─ {"id":642,"kind":"StringLiteral","value":"\"link\""}
│              │  ├─ {"id":644,"kind":"StringLiteral","value":"\"small\""}
│              │  ├─ {"id":648,"kind":"StringLiteral","value":"\"sub\""}
│              │  ├─ {"id":650,"kind":"StringLiteral","value":"\"sup\""}
│              │  ├─ {"id":693,"kind":"StringLiteral","value":"\"html\""}
│              │  ├─ {"id":699,"kind":"StringLiteral","value":"\"text\""}
│              │  ├─ {"id":956,"kind":"StringLiteral","value":"\"script\""}
│              │  ├─ {"id":1099,"kind":"StringLiteral","value":"\"body\""}
│              │  ├─ {"id":1105,"kind":"StringLiteral","value":"\"span\""}
│              │  ├─ {"id":1244,"kind":"StringLiteral","value":"\"var\""}
│              │  ├─ {"id":1703,"kind":"StringLiteral","value":"\"param\""}
│              │  ├─ {"id":2974,"kind":"StringLiteral","value":"\"footer\""}
│              │  ├─ {"id":3496,"kind":"StringLiteral","value":"\"meta\""}
│              │
@quantizor
Copy link
Contributor

Apologies, I have reverted the merge that I think is related https://github.com/styled-components/styled-components/releases/tag/v6.1.10

@eMerzh
Copy link
Contributor Author

eMerzh commented May 7, 2024

correct, it fixes the issue, thanks for the response :)
and thanks @uhyo for the attempt, even though we have to revert it.
you only break stuff if you do stuff :)

@eMerzh eMerzh closed this as completed May 7, 2024
@quantizor
Copy link
Contributor

These types are some of the most complex I've ever worked on... we'll get there eventually.

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

No branches or pull requests

2 participants