Skip to content

Commit f97eca0

Browse files
committed
Merge commit '2cb0c7f147154e6db1b90217d2930b6d84715ff4' into beta
2 parents 9f5efde + 2cb0c7f commit f97eca0

File tree

1,642 files changed

+847915
-2782
lines changed

Some content is hidden

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

1,642 files changed

+847915
-2782
lines changed

.bazelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ build --spawn_strategy=standalone
2222
build --strategy=SwiftCompile=standalone
2323
build --define RULES_SWIFT_BUILD_DUMMY_WORKER=1
2424

25+
common:index_build --experimental_convenience_symlinks=ignore
26+
common:index_build --bes_backend= --bes_results_url=
27+
common:index_build --nolegacy_important_outputs
28+
common:index_build --show_result=0
29+
common:index_build --define=buildNumber=10000
30+
common:index_build --define=telegramVersion=12.2.2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ buildServer.json
7474
Telegram.LSP.json
7575
**/.build/**
7676
spm-files
77+
.bsp/**

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ url=../tgcalls.git
3535
[submodule "third-party/XcodeGen"]
3636
path = third-party/XcodeGen
3737
url = https://github.com/yonaskolb/XcodeGen.git
38+
[submodule "build-system/bazel-rules/sourcekit-bazel-bsp"]
39+
path = build-system/bazel-rules/sourcekit-bazel-bsp
40+
url=https://github.com/ali-fareed/sourcekit-bazel-bsp.git

.sourcekit-lsp/config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"backgroundIndexing": true,
3+
"backgroundPreparationMode": "build",
4+
"defaultWorkspaceType": "buildServer",
5+
"logging": {
6+
"level": "error",
7+
"privacyLevel": "sensitive"
8+
}
9+
}

.vscode/launch.json

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
62
"configurations": [
73
{
8-
"type": "swift",
9-
"request": "launch",
10-
"args": [],
11-
"cwd": "${workspaceFolder:telegram-ios}",
124
"name": "Debug Telegram",
13-
"program": "${workspaceFolder:telegram-ios}/.build/debug/Telegram",
14-
"preLaunchTask": "swift: Build Debug Telegram"
5+
"type": "lldb-dap",
6+
"request": "attach",
7+
"preLaunchTask": "_launch_telegram",
8+
"debuggerRoot": "${workspaceFolder}",
9+
"attachCommands": [
10+
"process connect connect://localhost:6667"
11+
],
12+
"internalConsoleOptions": "openOnSessionStart",
13+
"timeout": 1000
1514
},
1615
{
17-
"type": "swift",
18-
"request": "launch",
19-
"args": [],
20-
"cwd": "${workspaceFolder:telegram-ios}",
21-
"name": "Release Telegram",
22-
"program": "${workspaceFolder:telegram-ios}/.build/release/Telegram",
23-
"preLaunchTask": "swift: Build Release Telegram"
16+
"name": "Restart Debug Telegram",
17+
"type": "lldb-dap",
18+
"request": "attach",
19+
"preLaunchTask": "Restart Telegram Debug",
20+
"debuggerRoot": "${workspaceFolder}",
21+
"attachCommands": [
22+
"process connect connect://localhost:6667"
23+
],
24+
"internalConsoleOptions": "openOnSessionStart",
25+
"timeout": 1000
2426
},
25-
{
26-
"type": "swift",
27-
"request": "launch",
28-
"args": [],
29-
"cwd": "${workspaceFolder:telegram-ios}",
30-
"name": "Debug telegram-ios",
31-
"program": "${workspaceFolder:telegram-ios}/.build/debug/telegram-ios",
32-
"preLaunchTask": "swift: Build Debug telegram-ios"
33-
},
34-
{
35-
"type": "swift",
36-
"request": "launch",
37-
"args": [],
38-
"cwd": "${workspaceFolder:telegram-ios}",
39-
"name": "Release telegram-ios",
40-
"program": "${workspaceFolder:telegram-ios}/.build/release/telegram-ios",
41-
"preLaunchTask": "swift: Build Release telegram-ios"
42-
}
43-
]
27+
],
28+
"options": {
29+
"console": "integratedTerminal",
30+
}
4431
}

.vscode/settings.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"sweetpad.build.xcodeWorkspacePath": "Telegram/Telegram.xcodeproj/project.xcworkspace",
3-
"lldb.library": "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB",
4-
"lldb.launch.expressions": "native",
52
"search.followSymlinks": false,
63
"files.exclude": {
74
".git/**": true
@@ -13,5 +10,17 @@
1310
".git/**": true
1411
},
1512
"files.associations": {
16-
}
13+
},
14+
"swift.sourcekit-lsp.backgroundIndexing": "on",
15+
"swift.sourcekit-lsp.trace.server": "messages",
16+
"terminal.integrated.profiles.osx": {
17+
"zsh": {
18+
"path": "/bin/zsh",
19+
"args": [
20+
"-l",
21+
"-i"
22+
]
23+
}
24+
},
25+
"swift.sourcekit-lsp.serverPath": "${workspaceFolder}/build-input/sourcekit-lsp",
1726
}

.vscode/tasks.json

Lines changed: 100 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,101 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
]
5-
}
6-
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build Telegram",
6+
"type": "shell",
7+
"command": "${workspaceFolder}/build-input/bazel-8.4.2-darwin-arm64",
8+
"args": [
9+
"build",
10+
"Telegram/Telegram",
11+
"--features=swift.use_global_module_cache",
12+
"--verbose_failures",
13+
"--remote_cache_async",
14+
"--features=swift.skip_function_bodies_for_derived_files",
15+
"--jobs=16",
16+
"--define=buildNumber=10000",
17+
"--define=telegramVersion=12.2.2",
18+
"--disk_cache=${HOME}/telegram-bazel-cache",
19+
"-c",
20+
"dbg",
21+
"--ios_multi_cpus=sim_arm64",
22+
"--watchos_cpus=arm64_32",
23+
"--features=swift.enable_batch_mode"
24+
],
25+
"group": {
26+
"kind": "build",
27+
"isDefault": true
28+
},
29+
"problemMatcher": [],
30+
"runOptions": {
31+
"instanceLimit": 1
32+
}
33+
},
34+
// Hidden never-ending task that handles the launch / debugging bits for Cmd+Shift+D.
35+
// The problemMatcher field defines when the task is effectively ready to be debugged
36+
// by the attach task in launch.json.
37+
{
38+
"label": "_launch_telegram",
39+
"type": "shell",
40+
"command": "./scripts/launch_and_debug.sh",
41+
"presentation": {
42+
"reveal": "always"
43+
},
44+
"hide": true,
45+
"isBackground": true,
46+
"problemMatcher": [
47+
{
48+
"pattern": [
49+
{
50+
"regexp": "\\b\\B",
51+
"file": 1,
52+
"location": 2,
53+
"message": 3
54+
}
55+
],
56+
"background": {
57+
"activeOnStart": true,
58+
"beginsPattern": "^.*Building....*",
59+
"endsPattern": "^.*Listening to port 6667 for a connection from .*"
60+
}
61+
}
62+
],
63+
"runOptions": {
64+
"instanceLimit": 1
65+
}
66+
},
67+
{
68+
"label": "Stream SourceKitBazelBSP Logs",
69+
"type": "shell",
70+
"command": "log stream --process sourcekit-bazel-bsp --debug",
71+
"problemMatcher": [],
72+
"isBackground": false,
73+
"presentation": {
74+
"reveal": "always",
75+
"panel": "dedicated"
76+
}
77+
},
78+
{
79+
"label": "Stop Telegram Debug Session",
80+
"type": "shell",
81+
"command": "pkill -f 'launch_and_debug.sh' || true; lsof -ti:6667 | xargs kill -9 2>/dev/null || true",
82+
"problemMatcher": [],
83+
"presentation": {
84+
"reveal": "silent",
85+
"close": true
86+
}
87+
},
88+
{
89+
"label": "Restart Telegram Debug",
90+
"dependsOrder": "sequence",
91+
"dependsOn": [
92+
"Stop Telegram Debug Session",
93+
"_launch_telegram"
94+
],
95+
"problemMatcher": [],
96+
"presentation": {
97+
"reveal": "always"
98+
}
99+
}
100+
]
101+
}

BUILD.bazel

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
load("@sourcekit_bazel_bsp//rules:setup_sourcekit_bsp.bzl", "setup_sourcekit_bsp")
2+
3+
setup_sourcekit_bsp(
4+
name = "setup_sourcekit_bsp_telegram_project",
5+
bazel_wrapper = "./build-input/bazel-8.4.2-darwin-arm64",
6+
files_to_watch = [
7+
"**/*.swift",
8+
],
9+
index_flags = [
10+
"config=index_build",
11+
],
12+
targets = [
13+
"//Telegram:Telegram",
14+
],
15+
)

MODULE.bazel

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ local_path_override(
3030

3131
http_file(
3232
name = "cmake_tar_gz",
33-
urls = ["https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-macos-universal.tar.gz"],
34-
sha256 = "f794ed92ccb4e9b6619a77328f313497d7decf8fb7e047ba35a348b838e0e1e2",
33+
urls = ["https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-macos-universal.tar.gz"],
34+
sha256 = "3be85f5b999e327b1ac7d804cbc9acd767059e9f603c42ec2765f6ab68fbd367",
3535
)
3636

3737
http_file(
@@ -62,3 +62,9 @@ local_path_override(
6262
module_name = "build_configuration",
6363
path = "./build-input/configuration-repository",
6464
)
65+
66+
bazel_dep(name = "sourcekit_bazel_bsp", version = "0.3.0")
67+
local_path_override(
68+
module_name = "sourcekit_bazel_bsp",
69+
path = "build-system/bazel-rules/sourcekit-bazel-bsp",
70+
)

MODULE.bazel.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)