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

Merge of VS Code 1.92 #4283

Merged
merged 8 commits into from
Aug 21, 2024
Merged

Merge of VS Code 1.92 #4283

merged 8 commits into from
Aug 21, 2024

Conversation

lionel-
Copy link
Contributor

@lionel- lionel- commented Aug 8, 2024

Merge of https://code.visualstudio.com/updates/v1_92

Joint work with @jmcphers.

In manual tests I checked in particular that the new "panel on top" feature interacts well with our changes for bottom panel minimisation. Our icons for minimise and restore only appear when in the bottom position. We might want to support them in the top position as well but for now this works well enough.

This merge updates the version of node used to build Positron. If you're building locally, you will need to run nvm install before rebuilding.

@lionel-
Copy link
Contributor Author

lionel- commented Aug 8, 2024

positron-bot bot and others added 7 commits August 19, 2024 16:51
From microsoft/vscode@af5cf64

Work around this error:

```
 Error: src/playwrightDriver.ts(235,20): error TS2769: No overload matches this call.
  Overload 1 of 2, '(pageFunction: PageFunction<IWindowDriver[], T>, arg: IWindowDriver[]): Promise<T>', gave the following error.
    Type 'JSHandle<IWindowDriver>' is missing the following properties from type 'IWindowDriver': setValue, isActiveElement, getElements, getElementXY, and 8 more.
  Overload 2 of 2, '(pageFunction: PageFunction<void, T>, arg?: any): Promise<T>', gave the following error.
    Argument of type 'PageFunction<IWindowDriver[], T>' is not assignable to parameter of type 'PageFunction<void, T>'.
      Type '(arg: IWindowDriver[]) => T | Promise<T>' is not assignable to type 'PageFunction<void, T>'.
        Type '(arg: IWindowDriver[]) => T | Promise<T>' is not assignable to type '(arg: void) => T | Promise<T>'.
          Types of parameters 'arg' and 'arg' are incompatible.
            Type 'void' is not assignable to type 'IWindowDriver[]'.
```
For nodejs/node#52554

Fixes:

```
[4/4] Building fresh packages...
error C:\a\positron\positron\extensions\jupyter-adapter\node_modules\lzma-native: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: C:\a\positron\positron\extensions\jupyter-adapter\node_modules\lzma-native
Output:
node:internal/child_process:421
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    throw new ErrnoException(err, 'spawn');
    ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at Object.spawn (node:child_process:761:9)
    at build (C:\a\positron\positron\extensions\jupyter-adapter\node_modules\node-gyp-build\bin.js:29:8)
    at preinstall (C:\a\positron\positron\extensions\jupyter-adapter\node_modules\node-gyp-build\bin.js:38:32)
    at Object.<anonymous> (C:\a\positron\positron\extensions\jupyter-adapter\node_modules\node-gyp-build\bin.js:15:3)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'
}
```
Fixes

```
node_modules/@parcel/watcher',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 688, in script_main
    return main(sys.argv[1:])
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 680, in main
    return gyp_main(args)
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 647, in gyp_main
    [generator, flat_list, targets, data] = Load(
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 157, in Load
    result = gyp.input.Load(
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2985, in Load
    LoadTargetBuildFile(
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 400, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 255, in LoadOneBuildFile
    LoadBuildFileIncludesIntoDict(
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 299, in LoadBuildFileIncludesIntoDict
    LoadOneBuildFile(include, data, aux_data, None, False, check),
  File "/opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 237, in LoadOneBuildFile
    build_file_data = eval(build_file_contents, {"__builtins__": {}}, None)
  File "/home/runner/.cache/node-gyp/20.14.0/include/node/common.gypi", line 546
    'l
    ^
SyntaxError: unterminated string literal (detected at line 546)
```
Fixes

```
Error: src/areas/positron/plots/plots.test.ts(92,82): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | ArrayBufferView'.
  Type 'Buffer' is not assignable to type 'Uint8Array | DataView'.
    Type 'Buffer' is not assignable to type 'Uint8Array'.
      The types returned by 'entries()' are incompatible between these types.
        Type 'IterableIterator<[number, number]>' is missing the following properties from type 'ArrayIterator<[number, number]>': map, filter, take, drop, and 8 more.
Error: src/areas/positron/plots/plots.test.ts(135,73): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | ArrayBufferView'.
  Type 'Buffer' is not assignable to type 'Uint8Array | DataView'.
    Type 'Buffer' is not assignable to type 'Uint8Array'.
      The types returned by 'entries()' are incompatible between these types.
        Type 'IterableIterator<[number, number]>' is missing the following properties from type 'ArrayIterator<[number, number]>': map, filter, take, drop, and 8 more.
Error: src/areas/positron/plots/plots.test.ts(314,70): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string | ArrayBufferView'.
  Type 'Buffer' is not assignable to type 'Uint8Array | DataView'.
    Type 'Buffer' is not assignable to type 'Uint8Array'.
      The types returned by 'entries()' are incompatible between these types.
        Type 'IterableIterator<[number, number]>' is missing the following properties from type 'ArrayIterator<[number, number]>': map, filter, take, drop, and 8 more.
```
@lionel- lionel- force-pushed the merge/1.92.0 branch 2 times, most recently from f686a03 to 8b2d597 Compare August 20, 2024 00:07
`filesToSkip` no longer works for us. It is not consulted for x64-only files,
which should be ignored via `x64ArchFiles`, which only accepts a single glob
pattern. So we now have our own procedure to stash away such files and move them
back into the universal bundle at the end.

We also create a new set of files to reconcile following
this upstream change:
microsoft/vscode@f6f90e0

Localised strings are now stored in an array and the strings are replaced at
build time by references to this array. Somehow this array differs across arch
distributions, so we fix that up by copying from the relevant files from the x64
dist to the arm64 one.
@lionel-
Copy link
Contributor Author

lionel- commented Aug 20, 2024

@jmcphers The universal build is now fixed. The full test suite passes and I've checked the built app manually. See commit messages for description of needed fixes to the build.

Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed I can build and run with this change!

@lionel- lionel- merged commit c4daff3 into main Aug 21, 2024
22 checks passed
@lionel- lionel- deleted the merge/1.92.0 branch August 21, 2024 15:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants