Skip to content

Commit a2e57b4

Browse files
committed
Merge branch 'main' into dev/cazamor/cmdNotFound
2 parents 6a361ef + 5f3a857 commit a2e57b4

File tree

295 files changed

+6966
-6036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+6966
-6036
lines changed

.github/actions/spelling/allow/microsoft.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ DWINRT
3232
enablewttlogging
3333
HOMESHARE
3434
Intelli
35+
issecret
3536
IVisual
3637
libucrt
3738
libucrtd
@@ -74,6 +75,7 @@ sid
7475
Skype
7576
SRW
7677
sxs
78+
symbolrequestprod
7779
Sysinternals
7880
sysnative
7981
systemroot

.github/actions/spelling/expect/expect.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
aaaaabbb
12
aabbcc
23
ABANDONFONT
34
abbcc
@@ -92,6 +93,8 @@ backported
9293
backstory
9394
barbaz
9495
Bazz
96+
bbb
97+
bbccb
9598
BBDM
9699
bbwe
97100
bcount
@@ -597,6 +600,7 @@ FECF
597600
FEEF
598601
fesb
599602
FFAF
603+
ffd
600604
FFDE
601605
FFFDb
602606
fgbg
@@ -757,6 +761,7 @@ hdr
757761
HDROP
758762
hdrstop
759763
HEIGHTSCROLL
764+
hfind
760765
hfont
761766
hfontresource
762767
hglobal
@@ -1155,6 +1160,7 @@ NOCONTEXTHELP
11551160
NOCOPYBITS
11561161
NODUP
11571162
noexcepts
1163+
NOFONT
11581164
NOINTEGRALHEIGHT
11591165
NOINTERFACE
11601166
NOLINKINFO

build/pipelines/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ trigger:
44
include:
55
- main
66
- feature/*
7+
- gh-readonly-queue/*
78
paths:
89
exclude:
910
- doc/*

build/pipelines/ob-nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ extends:
3333
publishSymbolsToPublic: true
3434
publishVpackToWindows: false
3535
symbolExpiryTime: 15
36+
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
37+
symbolPublishingProject: $(SymbolPublishingProject)
3638
${{ if eq(true, parameters.publishToAzure) }}:
3739
extraPublishJobs:
3840
- template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self

build/pipelines/ob-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ extends:
8181
terminalInternalPackageVersion: ${{ parameters.terminalInternalPackageVersion }}
8282
publishSymbolsToPublic: ${{ parameters.publishSymbolsToPublic }}
8383
publishVpackToWindows: ${{ parameters.publishVpackToWindows }}
84+
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
85+
symbolPublishingProject: $(SymbolPublishingProject)
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
parameters:
2+
- name: includePublicSymbolServer
3+
type: boolean
4+
default: false
5+
- name: pool
6+
type: object
7+
default: []
8+
- name: dependsOn
9+
type: object
10+
default: null
11+
- name: artifactStem
12+
type: string
13+
default: ''
14+
- name: jobName
15+
type: string
16+
default: PublishSymbols
17+
- name: symbolExpiryTime
18+
type: string
19+
default: 36530 # This is the default from PublishSymbols@2
20+
- name: variables
21+
type: object
22+
default: {}
23+
- name: subscription
24+
type: string
25+
- name: symbolProject
26+
type: string
27+
28+
jobs:
29+
- job: ${{ parameters.jobName }}
30+
${{ if ne(length(parameters.pool), 0) }}:
31+
pool: ${{ parameters.pool }}
32+
${{ if eq(parameters.includePublicSymbolServer, true) }}:
33+
displayName: Publish Symbols to Internal and MSDL
34+
${{ else }}:
35+
displayName: Publish Symbols Internally
36+
dependsOn: ${{ parameters.dependsOn }}
37+
variables:
38+
${{ insert }}: ${{ parameters.variables }}
39+
steps:
40+
- checkout: self
41+
clean: true
42+
fetchDepth: 1
43+
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
44+
submodules: true
45+
persistCredentials: True
46+
47+
- task: PkgESSetupBuild@12
48+
displayName: Package ES - Setup Build
49+
inputs:
50+
disableOutputRedirect: true
51+
52+
- task: DownloadPipelineArtifact@2
53+
displayName: Download all PDBs from all prior build phases
54+
inputs:
55+
itemPattern: '**/*.pdb'
56+
targetPath: '$(Build.SourcesDirectory)/bin'
57+
58+
- powershell: |-
59+
Get-PackageProvider -Name NuGet -ForceBootstrap
60+
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
61+
displayName: Install Azure Module Dependencies
62+
63+
# Transit the Azure token from the Service Connection into a secret variable for the rest of the pipeline to use.
64+
- task: AzurePowerShell@5
65+
displayName: Generate an Azure Token
66+
inputs:
67+
azureSubscription: ${{ parameters.subscription }}
68+
azurePowerShellVersion: LatestVersion
69+
pwsh: true
70+
ScriptType: InlineScript
71+
Inline: |-
72+
$AzToken = (Get-AzAccessToken -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token
73+
Write-Host "##vso[task.setvariable variable=SymbolAccessToken;issecret=true]$AzToken"
74+
75+
76+
- task: PublishSymbols@2
77+
displayName: Publish Symbols (to current Azure DevOps tenant)
78+
continueOnError: True
79+
inputs:
80+
SymbolsFolder: '$(Build.SourcesDirectory)/bin'
81+
SearchPattern: '**/*.pdb'
82+
IndexSources: false
83+
DetailedLog: true
84+
SymbolsMaximumWaitTime: 30
85+
SymbolServerType: 'TeamServices'
86+
SymbolsProduct: 'Windows Terminal Converged Symbols'
87+
SymbolsVersion: '$(XES_APPXMANIFESTVERSION)'
88+
SymbolsArtifactName: 'WindowsTerminal_$(XES_APPXMANIFESTVERSION)'
89+
SymbolExpirationInDays: ${{ parameters.symbolExpiryTime }}
90+
env:
91+
LIB: $(Build.SourcesDirectory)
92+
93+
- pwsh: |-
94+
# Prepare the defaults for IRM
95+
$PSDefaultParameterValues['Invoke-RestMethod:Headers'] = @{ Authorization = "Bearer $(SymbolAccessToken)" }
96+
$PSDefaultParameterValues['Invoke-RestMethod:ContentType'] = "application/json"
97+
$PSDefaultParameterValues['Invoke-RestMethod:Method'] = "POST"
98+
99+
$BaseUri = "https://symbolrequestprod.trafficmanager.net/projects/${{ parameters.symbolProject }}/requests"
100+
101+
# Prepare the request
102+
$expiration = (Get-Date).Add([TimeSpan]::FromDays(${{ parameters.symbolExpiryTime }}))
103+
$createRequestBody = @{
104+
requestName = "WindowsTerminal_$(XES_APPXMANIFESTVERSION)";
105+
expirationTime = $expiration.ToString();
106+
}
107+
Write-Host "##[debug]Starting request $($createRequestBody.requestName) with expiration date of $($createRequestBody.expirationTime)"
108+
Invoke-RestMethod -Uri "$BaseUri" -Body ($createRequestBody | ConvertTo-Json -Compress) -Verbose
109+
110+
# Request symbol publication
111+
$publishRequestBody = @{
112+
publishToInternalServer = $true;
113+
publishToPublicServer = $${{ parameters.includePublicSymbolServer }};
114+
}
115+
Write-Host "##[debug]Submitting request $($createRequestBody.requestName) ($($publishRequestBody | ConvertTo-Json -Compress))"
116+
Invoke-RestMethod -Uri "$BaseUri/$($createRequestBody.requestName)" -Body ($publishRequestBody | ConvertTo-Json -Compress) -Verbose
117+
displayName: Publish Symbols using internal REST API

build/pipelines/templates-v2/pipeline-onebranch-full-release-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ parameters:
5252
- name: publishVpackToWindows
5353
type: boolean
5454
default: false
55+
- name: symbolPublishingSubscription
56+
type: string
57+
- name: symbolPublishingProject
58+
type: string
5559

5660
- name: extraPublishJobs
5761
type: object
@@ -248,12 +252,13 @@ extends:
248252
displayName: Publish
249253
dependsOn: [Build]
250254
jobs:
251-
- template: ./build/pipelines/templates-v2/job-publish-symbols.yml@self
255+
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
252256
parameters:
253257
pool: { type: windows }
254258
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
255-
symbolPatGoesInTaskInputs: true # onebranch tries to muck with the PAT variable, so we need to change how it get the PAT
256259
symbolExpiryTime: ${{ parameters.symbolExpiryTime }}
260+
subscription: ${{ parameters.symbolPublishingSubscription }}
261+
symbolProject: ${{ parameters.symbolPublishingProject }}
257262
variables:
258263
ob_git_checkout: false # This job checks itself out
259264
ob_git_skip_checkout_none: true

doc/building.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,47 @@ popd
154154
The `bx` will build just the Terminal package, critically, populating the `CascadiaPackage.build.appxrecipe` file. Once that's been built, then the `DeployAppRecipe.exe` command can be used to deploy a loose layout in the same way that Visual Studio does.
155155

156156
Notably, this method of building the Terminal package can't leverage the FastUpToDate check in Visual Studio, so the builds end up being considerably slower for the whole package, as cppwinrt does a lot of work before confirming that it's up to date and doing nothing.
157+
158+
159+
### Are you seeing `DEP0700: Registration of the app failed`?
160+
161+
Once in a blue moon, I get a `DEP0700: Registration of the app failed.
162+
[0x80073CF6] error 0x80070020: Windows cannot register the package because of an
163+
internal error or low memory.` when trying to deploy in VS. For us, that can
164+
happen if the `OpenConsoleProxy.dll` gets locked up, in use by some other
165+
terminal package.
166+
167+
Doing the equivalent command in powershell can give us more info:
168+
169+
```pwsh
170+
Add-AppxPackage -register "Z:\dev\public\OpenConsole\src\cascadia\CascadiaPackage\bin\x64\Debug\AppX\AppxManifest.xml"
171+
```
172+
173+
That'll suggest `NOTE: For additional information, look for [ActivityId]
174+
dbf551f1-83d0-0007-43e7-9cded083da01 in the Event Log or use the command line
175+
Get-AppPackageLog -ActivityID dbf551f1-83d0-0007-43e7-9cded083da01`. So do that:
176+
177+
```pwsh
178+
Get-AppPackageLog -ActivityID dbf551f1-83d0-0007-43e7-9cded083da01
179+
```
180+
181+
which will give you a lot of info. In my case, that revealed that the platform
182+
couldn't delete the packaged com entries. The key line was: `AppX Deployment
183+
operation failed with error 0x0 from API Logging data because access was denied
184+
for file:
185+
C:\ProgramData\Microsoft\Windows\AppRepository\Packages\WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe,
186+
user SID: S-1-5-18`
187+
188+
Take that path, and
189+
```pwsh
190+
sudo start C:\ProgramData\Microsoft\Windows\AppRepository\Packages\WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe
191+
```
192+
193+
(use `sudo`, since the path is otherwise locked down). From there, go into the
194+
`PackagedCom` folder, and open [File
195+
Locksmith](https://learn.microsoft.com/en-us/windows/powertoys/file-locksmith)
196+
(or Process Explorer, if you're more familiar with that) on
197+
`OpenConsoleProxy.dll`. Just go ahead and immediately re-launch it as admin,
198+
too. That should list off a couple terminal processes that are just hanging
199+
around. Go ahead and end them all. You should be good to deploy again after
200+
that.

doc/cascadia/profiles.schema.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,12 +2332,20 @@
23322332
},
23332333
"type": "array"
23342334
},
2335-
"experimental.rendering.forceFullRepaint": {
2336-
"description": "When set to true, we will redraw the entire screen each frame. When set to false, we will render only the updates to the screen between frames.",
2335+
"rendering.graphicsAPI": {
2336+
"description": "Direct3D 11 provides a more performant and feature-rich experience, whereas Direct2D is more stable. The default option \"Automatic\" will pick the API that best fits your graphics hardware. If you experience significant issues, consider using Direct2D.",
2337+
"type": "string",
2338+
"enum": [
2339+
"direct2d",
2340+
"direct3d11"
2341+
]
2342+
},
2343+
"rendering.disablePartialInvalidation": {
2344+
"description": "By default, the text renderer uses a FLIP_SEQUENTIAL Swap Chain and declares dirty rectangles via the Present1 API. When this setting is enabled, a FLIP_DISCARD Swap Chain will be used instead, and no dirty rectangles will be declared. Whether one or the other is better depends on your hardware and various other factors.",
23372345
"type": "boolean"
23382346
},
2339-
"experimental.rendering.software": {
2340-
"description": "When set to true, we will use the software renderer (a.k.a. WARP) instead of the hardware one.",
2347+
"rendering.software": {
2348+
"description": "When enabled, the terminal will use a software rasterizer (WARP). This setting should be left disabled under almost all circumstances.",
23412349
"type": "boolean"
23422350
},
23432351
"experimental.input.forceVT": {
@@ -2769,10 +2777,6 @@
27692777
"description": "When set to true, prompts will automatically be marked.",
27702778
"type": "boolean"
27712779
},
2772-
"experimental.connection.passthroughMode": {
2773-
"description": "When set to true, directs the PTY for this connection to use pass-through mode instead of the original Conhost PTY simulation engine. This is an experimental feature, and its continued existence is not guaranteed.",
2774-
"type": "boolean"
2775-
},
27762780
"experimental.retroTerminalEffect": {
27772781
"description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
27782782
"type": "boolean"

src/buffer/out/LineRendition.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,24 @@ enum class LineRendition : uint8_t
2323

2424
constexpr til::inclusive_rect ScreenToBufferLine(const til::inclusive_rect& line, const LineRendition lineRendition)
2525
{
26-
// Use shift right to quickly divide the Left and Right by 2 for double width lines.
2726
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
2827
return { line.left >> scale, line.top, line.right >> scale, line.bottom };
2928
}
3029

31-
constexpr til::point ScreenToBufferLine(const til::point& line, const LineRendition lineRendition)
30+
constexpr til::point ScreenToBufferLineInclusive(const til::point& line, const LineRendition lineRendition)
3231
{
33-
// Use shift right to quickly divide the Left and Right by 2 for double width lines.
3432
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
3533
return { line.x >> scale, line.y };
3634
}
3735

36+
constexpr til::rect BufferToScreenLine(const til::rect& line, const LineRendition lineRendition)
37+
{
38+
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
39+
return { line.left << scale, line.top, line.right << scale, line.bottom };
40+
}
41+
3842
constexpr til::inclusive_rect BufferToScreenLine(const til::inclusive_rect& line, const LineRendition lineRendition)
3943
{
40-
// Use shift left to quickly multiply the Left and Right by 2 for double width lines.
4144
const auto scale = lineRendition == LineRendition::SingleWidth ? 0 : 1;
4245
return { line.left << scale, line.top, (line.right << scale) + scale, line.bottom };
4346
}

0 commit comments

Comments
 (0)