Skip to content

Commit d789de4

Browse files
author
aiday-mar
committed
Merge branch 'main' into aiday/issue158871
2 parents c921692 + 7ed02a6 commit d789de4

File tree

37 files changed

+602
-235
lines changed

37 files changed

+602
-235
lines changed

build/linux/debian/calculate-deps.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ function calculatePackageDeps(binaryPath, arch, sysroot) {
6565
depsStr = line.substring(shlibsDependsPrefix.length);
6666
}
6767
}
68-
const requires = new Set(depsStr.split(', ').sort());
68+
// Refs https://chromium-review.googlesource.com/c/chromium/src/+/3572926
69+
// Chromium depends on libgcc_s, is from the package libgcc1. However, in
70+
// Bullseye, the package was renamed to libgcc-s1. To avoid adding a dep
71+
// on the newer package, this hack skips the dep. This is safe because
72+
// libgcc-s1 is a dependency of libc6. This hack can be removed once
73+
// support for Debian Buster and Ubuntu Bionic are dropped.
74+
const filteredDeps = depsStr.split(', ').filter(dependency => {
75+
return !dependency.startsWith('libgcc-s1');
76+
}).sort();
77+
const requires = new Set(filteredDeps);
6978
return requires;
7079
}

build/linux/debian/calculate-deps.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, sysroo
7070
depsStr = line.substring(shlibsDependsPrefix.length);
7171
}
7272
}
73-
const requires = new Set(depsStr.split(', ').sort());
73+
// Refs https://chromium-review.googlesource.com/c/chromium/src/+/3572926
74+
// Chromium depends on libgcc_s, is from the package libgcc1. However, in
75+
// Bullseye, the package was renamed to libgcc-s1. To avoid adding a dep
76+
// on the newer package, this hack skips the dep. This is safe because
77+
// libgcc-s1 is a dependency of libc6. This hack can be removed once
78+
// support for Debian Buster and Ubuntu Bionic are dropped.
79+
const filteredDeps = depsStr.split(', ').filter(dependency => {
80+
return !dependency.startsWith('libgcc-s1');
81+
}).sort();
82+
const requires = new Set(filteredDeps);
7483
return requires;
7584
}

build/linux/debian/dep-lists.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ exports.referenceGeneratedDepsByArch = {
3636
'libdrm2 (>= 2.4.38)',
3737
'libexpat1 (>= 2.0.1)',
3838
'libgbm1 (>= 8.1~0)',
39-
'libgcc-s1 (>= 3.0)',
4039
'libglib2.0-0 (>= 2.16.0)',
4140
'libglib2.0-0 (>= 2.39.4)',
4241
'libgtk-3-0 (>= 3.9.10)',
@@ -73,8 +72,6 @@ exports.referenceGeneratedDepsByArch = {
7372
'libdrm2 (>= 2.4.38)',
7473
'libexpat1 (>= 2.0.1)',
7574
'libgbm1 (>= 8.1~0)',
76-
'libgcc-s1 (>= 3.0)',
77-
'libgcc-s1 (>= 3.5)',
7875
'libglib2.0-0 (>= 2.16.0)',
7976
'libglib2.0-0 (>= 2.39.4)',
8077
'libgtk-3-0 (>= 3.9.10)',

build/linux/debian/dep-lists.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const referenceGeneratedDepsByArch = {
3636
'libdrm2 (>= 2.4.38)',
3737
'libexpat1 (>= 2.0.1)',
3838
'libgbm1 (>= 8.1~0)',
39-
'libgcc-s1 (>= 3.0)',
4039
'libglib2.0-0 (>= 2.16.0)',
4140
'libglib2.0-0 (>= 2.39.4)',
4241
'libgtk-3-0 (>= 3.9.10)',
@@ -73,8 +72,6 @@ export const referenceGeneratedDepsByArch = {
7372
'libdrm2 (>= 2.4.38)',
7473
'libexpat1 (>= 2.0.1)',
7574
'libgbm1 (>= 8.1~0)',
76-
'libgcc-s1 (>= 3.0)',
77-
'libgcc-s1 (>= 3.5)',
7875
'libglib2.0-0 (>= 2.16.0)',
7976
'libglib2.0-0 (>= 2.39.4)',
8077
'libgtk-3-0 (>= 3.9.10)',

cglicenses.json

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -174,33 +174,6 @@
174174
"SOFTWARE"
175175
]
176176
},
177-
{
178-
// Reason: Waiting for https://github.com/microsoft/vscode-markdown-languageservice/pull/9
179-
"name": "vscode-markdown-languageservice",
180-
"fullLicenseText": [
181-
"MIT License",
182-
"",
183-
"Copyright (c) Microsoft Corporation.",
184-
"",
185-
"Permission is hereby granted, free of charge, to any person obtaining a copy",
186-
"of this software and associated documentation files (the \"Software\"), to deal",
187-
"in the Software without restriction, including without limitation the rights",
188-
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
189-
"copies of the Software, and to permit persons to whom the Software is",
190-
"furnished to do so, subject to the following conditions:",
191-
"",
192-
"The above copyright notice and this permission notice shall be included in all",
193-
"copies or substantial portions of the Software.",
194-
"",
195-
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
196-
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
197-
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
198-
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
199-
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
200-
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
201-
"SOFTWARE"
202-
]
203-
}
204177
{
205178
// Reason: This product includes AVC coding technology. MPEG LA LLC requires this notice.
206179
"name": "H.264/AVC Video Standard",
@@ -217,5 +190,35 @@
217190
"(i) redistribution of the product to third parties, or",
218191
"(ii) creation of content with AVC Standard compliant technologies for distribution to third parties."
219192
]
193+
},
194+
{
195+
// Reason: Missing license file
196+
"name": "@tokenizer/token",
197+
"fullLicenseText": [
198+
"(The MIT License)",
199+
"",
200+
"Copyright (c) 2020 Borewit",
201+
"",
202+
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
203+
"",
204+
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
205+
"",
206+
"THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
207+
]
208+
},
209+
{
210+
// Reason: Missing license file
211+
"name": "readable-web-to-node-stream",
212+
"fullLicenseText": [
213+
"(The MIT License)",
214+
"",
215+
"Copyright (c) 2019 Borewit",
216+
"",
217+
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
218+
"",
219+
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
220+
"",
221+
"THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
222+
]
220223
}
221224
]

cgmanifest.json

Lines changed: 133 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,138 @@
5353
},
5454
"isOnlyProductionDependency": true,
5555
"license": "LGPL-2.1+",
56-
"version": "4.4.git"
56+
"version": "4.4.git",
57+
"licenseDetail": [
58+
"# License",
59+
"",
60+
"Most files in FFmpeg are under the GNU Lesser General Public License version 2.1",
61+
"or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other",
62+
"files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to",
63+
"FFmpeg.",
64+
"",
65+
"Some optional parts of FFmpeg are licensed under the GNU General Public License",
66+
"version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of",
67+
"these parts are used by default, you have to explicitly pass `--enable-gpl` to",
68+
"configure to activate them. In this case, FFmpeg's license changes to GPL v2+.",
69+
"",
70+
"Specifically, the GPL parts of FFmpeg are:",
71+
"",
72+
"- libpostproc",
73+
"- optional x86 optimization in the files",
74+
" - `libavcodec/x86/flac_dsp_gpl.asm`",
75+
" - `libavcodec/x86/idct_mmx.c`",
76+
" - `libavfilter/x86/vf_removegrain.asm`",
77+
"- the following building and testing tools",
78+
" - `compat/solaris/make_sunver.pl`",
79+
" - `doc/t2h.pm`",
80+
" - `doc/texi2pod.pl`",
81+
" - `libswresample/tests/swresample.c`",
82+
" - `tests/checkasm/*`",
83+
" - `tests/tiny_ssim.c`",
84+
"- the following filters in libavfilter:",
85+
" - `signature_lookup.c`",
86+
" - `vf_blackframe.c`",
87+
" - `vf_boxblur.c`",
88+
" - `vf_colormatrix.c`",
89+
" - `vf_cover_rect.c`",
90+
" - `vf_cropdetect.c`",
91+
" - `vf_delogo.c`",
92+
" - `vf_eq.c`",
93+
" - `vf_find_rect.c`",
94+
" - `vf_fspp.c`",
95+
" - `vf_histeq.c`",
96+
" - `vf_hqdn3d.c`",
97+
" - `vf_kerndeint.c`",
98+
" - `vf_lensfun.c` (GPL version 3 or later)",
99+
" - `vf_mcdeint.c`",
100+
" - `vf_mpdecimate.c`",
101+
" - `vf_nnedi.c`",
102+
" - `vf_owdenoise.c`",
103+
" - `vf_perspective.c`",
104+
" - `vf_phase.c`",
105+
" - `vf_pp.c`",
106+
" - `vf_pp7.c`",
107+
" - `vf_pullup.c`",
108+
" - `vf_repeatfields.c`",
109+
" - `vf_sab.c`",
110+
" - `vf_signature.c`",
111+
" - `vf_smartblur.c`",
112+
" - `vf_spp.c`",
113+
" - `vf_stereo3d.c`",
114+
" - `vf_super2xsai.c`",
115+
" - `vf_tinterlace.c`",
116+
" - `vf_uspp.c`",
117+
" - `vf_vaguedenoiser.c`",
118+
" - `vsrc_mptestsrc.c`",
119+
"",
120+
"Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then",
121+
"the configure parameter `--enable-version3` will activate this licensing option",
122+
"for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts,",
123+
"`COPYING.GPLv3` to learn the exact legal terms that apply in this case.",
124+
"",
125+
"There are a handful of files under other licensing terms, namely:",
126+
"",
127+
"* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and",
128+
" `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for",
129+
" licensing details. Specifically note that you must credit the IJG in the",
130+
" documentation accompanying your program if you only distribute executables.",
131+
" You must also indicate any changes including additions and deletions to",
132+
" those three files in the documentation.",
133+
"* `tests/reference.pnm` is under the expat license.",
134+
"",
135+
"",
136+
"## External libraries",
137+
"",
138+
"FFmpeg can be combined with a number of external libraries, which sometimes",
139+
"affect the licensing of binaries resulting from the combination.",
140+
"",
141+
"### Compatible libraries",
142+
"",
143+
"The following libraries are under GPL version 2:",
144+
"- avisynth",
145+
"- frei0r",
146+
"- libcdio",
147+
"- libdavs2",
148+
"- librubberband",
149+
"- libvidstab",
150+
"- libx264",
151+
"- libx265",
152+
"- libxavs",
153+
"- libxavs2",
154+
"- libxvid",
155+
"",
156+
"When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by",
157+
"passing `--enable-gpl` to configure.",
158+
"",
159+
"The following libraries are under LGPL version 3:",
160+
"- gmp",
161+
"- libaribb24",
162+
"- liblensfun",
163+
"",
164+
"When combining them with FFmpeg, use the configure option `--enable-version3` to",
165+
"upgrade FFmpeg to the LGPL v3.",
166+
"",
167+
"The VMAF, mbedTLS, RK MPI, OpenCORE and VisualOn libraries are under the Apache License",
168+
"2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with",
169+
"version 3 of those licenses. So to combine these libraries with FFmpeg, the",
170+
"license version needs to be upgraded by passing `--enable-version3` to configure.",
171+
"",
172+
"The smbclient library is under the GPL v3, to combine it with FFmpeg,",
173+
"the options `--enable-gpl` and `--enable-version3` have to be passed to",
174+
"configure to upgrade FFmpeg to the GPL v3.",
175+
"",
176+
"### Incompatible libraries",
177+
"",
178+
"There are certain libraries you can combine with FFmpeg whose licenses are not",
179+
"compatible with the GPL and/or the LGPL. If you wish to enable these",
180+
"libraries, even in circumstances that their license may be incompatible, pass",
181+
"`--enable-nonfree` to configure. This will cause the resulting binary to be",
182+
"unredistributable.",
183+
"",
184+
"The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are",
185+
"incompatible with the GPLv2 and v3. To the best of our knowledge, they are",
186+
"compatible with the LGPL."
187+
]
57188
},
58189
{
59190
"component": {
@@ -563,7 +694,7 @@
563694
"commitHash": "5b871f95fd9cb8efa8ee9a80600510d5e5339137"
564695
}
565696
},
566-
"licenseDetail":[
697+
"licenseDetail": [
567698
"MIT License",
568699
"",
569700
"Copyright (c) Microsoft Corporation.",

extensions/ipynb/src/notebookImagePaste.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import * as vscode from 'vscode';
88
class CopyPasteEditProvider implements vscode.DocumentPasteEditProvider {
99

1010
async provideDocumentPasteEdits(
11-
_document: vscode.TextDocument,
11+
document: vscode.TextDocument,
1212
_ranges: readonly vscode.Range[],
1313
dataTransfer: vscode.DataTransfer,
1414
_token: vscode.CancellationToken
1515
): Promise<vscode.DocumentPasteEdit | undefined> {
1616

17-
const enabled = vscode.workspace.getConfiguration('ipynb', _document).get('experimental.pasteImages.enabled', false);
17+
const enabled = vscode.workspace.getConfiguration('ipynb', document).get('experimental.pasteImages.enabled', false);
1818
if (!enabled) {
1919
return undefined;
2020
}
@@ -42,24 +42,13 @@ class CopyPasteEditProvider implements vscode.DocumentPasteEditProvider {
4242
return undefined;
4343
}
4444

45-
// get notebook cell
46-
let notebookUri;
47-
let currentCell;
48-
for (const notebook of vscode.workspace.notebookDocuments) {
49-
if (notebook.uri.path === _document.uri.path) {
50-
for (const cell of notebook.getCells()) {
51-
if (cell.document === _document) {
52-
currentCell = cell;
53-
notebookUri = notebook.uri;
54-
break;
55-
}
56-
}
57-
}
58-
}
59-
if (!currentCell || !notebookUri) {
45+
const currentCell = this.getCellFromCellDocument(document);
46+
if (!currentCell) {
6047
return undefined;
6148
}
6249

50+
const notebookUri = currentCell.notebook.uri;
51+
6352
// create updated metadata for cell (prep for WorkspaceEdit)
6453
const b64string = encodeBase64(fileDataAsUint8);
6554
const startingAttachments = currentCell.metadata.custom?.attachments;
@@ -78,6 +67,19 @@ class CopyPasteEditProvider implements vscode.DocumentPasteEditProvider {
7867

7968
return { insertText: pasteSnippet, additionalEdit: workspaceEdit };
8069
}
70+
71+
private getCellFromCellDocument(cellDocument: vscode.TextDocument): vscode.NotebookCell | undefined {
72+
for (const notebook of vscode.workspace.notebookDocuments) {
73+
if (notebook.uri.path === cellDocument.uri.path) {
74+
for (const cell of notebook.getCells()) {
75+
if (cell.document === cellDocument) {
76+
return cell;
77+
}
78+
}
79+
}
80+
}
81+
return undefined;
82+
}
8183
}
8284

8385
/**
@@ -122,7 +124,7 @@ function encodeBase64(buffer: Uint8Array, padded = true, urlSafe = false) {
122124
}
123125

124126
function buildMetadata(b64: string, cell: vscode.NotebookCell, filename: string, filetype: string, startingAttachments: any): { [key: string]: any } {
125-
const outputMetadata: { [key: string]: any } = cell.metadata;
127+
const outputMetadata = { ...cell.metadata };
126128
const customField = cell.metadata.custom;
127129
if (!customField) {
128130
return { 'custom': { 'attachments': { [filename]: { 'image/png': b64 } } } };

extensions/markdown-language-features/src/languageFeatures/updatePathsOnRename.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import * as path from 'path';
77
import * as picomatch from 'picomatch';
88
import * as vscode from 'vscode';
9-
import { BaseLanguageClient } from 'vscode-languageclient';
9+
import { BaseLanguageClient, TextDocumentEdit } from 'vscode-languageclient';
1010
import * as nls from 'vscode-nls';
1111
import { getEditForFileRenames } from '../protocol';
1212
import { Delayer } from '../util/async';
@@ -206,13 +206,13 @@ class UpdateLinksOnFileRenameHandler extends Disposable {
206206
token: vscode.CancellationToken,
207207
): Promise<boolean> {
208208
const edit = await this.client.sendRequest(getEditForFileRenames, [{ oldUri: oldUri.toString(), newUri: newUri.toString() }], token);
209-
if (!edit.changes) {
209+
if (!edit.documentChanges?.length) {
210210
return false;
211211
}
212212

213-
for (const [path, edits] of Object.entries(edit.changes)) {
214-
const uri = vscode.Uri.parse(path);
215-
for (const edit of edits) {
213+
for (const change of edit.documentChanges as TextDocumentEdit[]) {
214+
const uri = vscode.Uri.parse(change.textDocument.uri);
215+
for (const edit of change.edits) {
216216
workspaceEdit.replace(uri, convertRange(edit.range), edit.newText);
217217
}
218218
}

0 commit comments

Comments
 (0)