@@ -1597,13 +1597,27 @@ export class DefaultClient implements Client {
1597
1597
debug : { command : serverModule , args : [ serverName ] , options : { detached : true } }
1598
1598
} ;
1599
1599
1600
+ // The IntelliSense process should automatically detect when AutoPCH is
1601
+ // not supportable (on platforms that don't support disabling ASLR/PIE).
1602
+ // We've had reports of issues on arm64 macOS that are addressed by
1603
+ // disabling the IntelliSense cache, suggesting fallback does not
1604
+ // always work as expected. It's actually more efficient to disable
1605
+ // the cache on platforms we know do not support it. We do that here.
1600
1606
let intelliSenseCacheDisabled : boolean = false ;
1601
1607
if ( os . platform ( ) === "darwin" ) {
1602
- const releaseParts : string [ ] = os . release ( ) . split ( "." ) ;
1603
- if ( releaseParts . length >= 1 ) {
1604
- // AutoPCH doesn't work for older Mac OS's.
1605
- intelliSenseCacheDisabled = parseInt ( releaseParts [ 0 ] ) < 17 ;
1608
+ // AutoPCH doesn't work for arm64 macOS.
1609
+ if ( os . arch ( ) === "arm64" ) {
1610
+ intelliSenseCacheDisabled = true ;
1611
+ } else {
1612
+ // AutoPCH doesn't work for older x64 macOS's.
1613
+ const releaseParts : string [ ] = os . release ( ) . split ( "." ) ;
1614
+ if ( releaseParts . length >= 1 ) {
1615
+ intelliSenseCacheDisabled = parseInt ( releaseParts [ 0 ] ) < 17 ;
1616
+ }
1606
1617
}
1618
+ } else {
1619
+ // AutoPCH doesn't work for arm64 Windows.
1620
+ intelliSenseCacheDisabled = os . platform ( ) === "win32" && os . arch ( ) === "arm64" ;
1607
1621
}
1608
1622
1609
1623
const localizedStrings : string [ ] = [ ] ;
0 commit comments