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

Use nodejs 16 versions of yarn and pnpm #2001

Merged
merged 13 commits into from
Nov 12, 2021
Merged

Conversation

Rheeseyb
Copy link
Contributor

@Rheeseyb Rheeseyb commented Nov 11, 2021

Problem:
Yarn and PNPM use their own version of nodejs, meaning we weren't actually using node.js 16 when we thought we were, breaking the build after updating vs code

Fix:
Update the shell.nix to use the node.js 16 versions of yarn and pnpm. Unfortunately due to a strange bug (see NixOS/nixpkgs#145432), the pkgs.nodePackages_latest versions of these don't result in a symlink, so we had to manually create those, which also meant copying an override from nix's node-packages/default.nix for pnpm and pnpx.

Output:

$ yarn config list
yarn config v1.22.11
info yarn config
{
  'version-tag-prefix': 'v',
  'version-git-tag': true,
  'version-commit-hooks': true,
  'version-git-sign': false,
  'version-git-message': 'v%s',
  'init-version': '1.0.0',
  'init-license': 'MIT',
  'save-prefix': '^',
  'bin-links': true,
  'ignore-scripts': false,
  'ignore-optional': false,
  registry: 'https://registry.yarnpkg.com',
  'strict-ssl': false,
  'user-agent': 'yarn/1.22.11 npm/? node/v16.6.2 linux x64',
  lastUpdateCheck: 1636544518023
}
info npm config
{
  'cache-min': '9999999',
  'strict-ssl': true
}
Done in 0.04s.
$ pnpm config list
; "user" config from /home/rheese/.npmrc

cache-min = 9999999 
strict-ssl = true 

; node bin location = /nix/store/hs9ajfsbjybx4mf1f35xpj1nbdfj5hhz-nodejs-16.6.2/bin/node
; cwd = /home/rheese/Workspace/Utopia/utopia
; HOME = /home/rheese
; Run `npm config ls -l` to show all defaults.

@relativeci
Copy link

relativeci bot commented Nov 11, 2021

Job #402: Bundle Size — 42.81MB (~-0.01%).

aab0e7a vs 57ffdcc83116a21e7b1728916d1f52e78a90d8d8

Changed metrics (1/8)
Metric Current Baseline
Initial JS 27.72MB(~-0.01%) 27.72MB
Changed assets by type (1/7)
            Current     Baseline
JS 42.8MB (~-0.01%) 42.8MB

View Job #402 report on app.relative-ci.com

@github-actions
Copy link
Contributor

Link to test editor
This PR:
Scroll Canvas: 58.4ms (43.7-154.6ms) | Resize: 95.3ms (20.4-236.9ms) | Selection: 271.1ms (232.9-634.2ms) | Calc Pi: 29ms (27-43ms) | Empty Dispatch: 49.7ms (40.1-128.9ms) | (Chart)
Compare with last deployed Master:
Scroll Canvas: 57.5ms (42.1-110.9ms) | Resize: 89.2ms (18.6-257.2ms) | Selection: 271.3ms (238.8-731.6ms) | Calc Pi: 29ms (27-38ms) | Empty Dispatch: 48.3ms (41.2-207.3ms) | (Chart)

@github-actions
Copy link
Contributor

Link to test editor
This PR:
Scroll Canvas: 73.5ms (53.4-173.1ms) | Resize: 120.7ms (19.7-982.2ms) | Selection: 351.1ms (291.5-838.1ms) | Calc Pi: 27ms (26-44ms) | Empty Dispatch: 55.9ms (45.8-681ms) | (Chart)
Compare with last deployed Master:
Scroll Canvas: 76.4ms (59.5-117.6ms) | Resize: 120.2ms (27.7-263.1ms) | Selection: 352.9ms (303.7-621.1ms) | Calc Pi: 28ms (26-35ms) | Empty Dispatch: 55.9ms (46.5-162.6ms) | (Chart)

@github-actions
Copy link
Contributor

Link to test editor
This PR:
Scroll Canvas: 80.5ms (57.3-148ms) | Resize: 127.4ms (22.9-265.7ms) | Selection: 352.2ms (295.7-626.5ms) | Calc Pi: 41ms (37-90ms) | Empty Dispatch: 64.5ms (48.3-784.4ms) | (Chart)
Compare with last deployed Master:
Scroll Canvas: 86.8ms (56.7-535ms) | Resize: 120.8ms (27.7-313.3ms) | Selection: 358.8ms (285.3-994.3ms) | Calc Pi: 39ms (35-50ms) | Empty Dispatch: 61.5ms (44.7-582.3ms) | (Chart)

Rheeseyb and others added 4 commits November 12, 2021 10:32
- Fixes #1986.
- Remove the check for `event.kind` in `initMessaging` so that backspaces
  definitely get included.
- Add a catch inside `cursorPositionChanged` as a safety measure against
  failures in there.
- Added `walkElementsWithin` to handle `ElementsWithin` for an arbitrary
  block similarly to `walkElementChildren`.
- Factored out `compareAndWalkElements` from `walkElementChildren` so that
  it could be used in `walkElementsWithin`, adding an additional clause for
  `JSXArbitraryBlock` instances.
- Removed `getHighlightBoundsForUids` as it's unused.
- Removed `removeNonExistingViewReferencesFromState` and `elementPathStillExists`
  as they are unused.
@Rheeseyb Rheeseyb merged commit 51a6ad7 into master Nov 12, 2021
@Rheeseyb Rheeseyb deleted the fix/pnpm-yarn-latest-nodejs branch November 12, 2021 11:09
@github-actions
Copy link
Contributor

Link to test editor
This PR:
Scroll Canvas: 78.7ms (58-177.5ms) | Resize: 128.9ms (25.4-321.6ms) | Selection: 522.6ms (412.7-760ms) | Calc Pi: 30ms (29-49ms) | Empty Dispatch: 64.9ms (49.1-699.9ms) | (Chart)
Compare with last deployed Master:
Scroll Canvas: 75.7ms (54-136.3ms) | Resize: 131.8ms (30.7-280.3ms) | Selection: 363.9ms (303.9-871.2ms) | Calc Pi: 33ms (29-108ms) | Empty Dispatch: 66.3ms (49.6-395.2ms) | (Chart)

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

Successfully merging this pull request may close these issues.

4 participants