This extension contributes the following commands:
Setup bis project: zxz-moe-bis.generateLaunchJson
generate .vscode/launch.json
Notice: the target must have mandatory providers: 'AppleBundleInfo'
Variable
zxz-moe-bis.buildTarget
Label of selected target
ex: //binary:app
zxz-moe-bis.cpu
Cpu string of selected device
ex: ios_arm64
zxz-moe-bis.compilationMode
CompilationMode string of selected mode
ex: dbg or opt
Extension Settings
This extension contributes the following settings:
bis.auto_generate_launch_json
Auto generate .vscode/launch.json when configuration changing deteched
bis.prebuild_swift_when_indexing
Prebuild swiftmodule used in compile commands
bis.simulator_cpu_string
Default cpu string for simulator ( | ios_x86_64)
bis.bazel_background_output_base
Temporary output_base when building
Notice: it may affect the bazel-out symbol link (Set to '' to disable it)
bis.pre_launch_task_name
Task executed before launch. Default value is bis.build: build
We can specify custom build task
bis.build_options
Custom build options append to bazel build
bis.startup_options
Custom startup options append to bazel
bis.compile_commands_rolling_size
Less than it would merge compile_commands.json automatically
We can it to 0 if we don't want to auto merge
How bis work
It bridged rules_apple with CodeLLDB and generate launch.json automatically
It generate and refresh compile_commands.json automatically which is provided to SourceKit-lsp embed in swift extension
Acknowledge
It only support ios_application for now
Frequently Asked Questions
Why is my swift code hinting not working?
We need to disable some features like --features=swift.vfsoverlay--features=swift.use_explicit_swift_module_map because sourcekit-lsp does not fully support the full set of swift features.
Why is my jump to swift modules not working?
We need to build a sourcekit-lsp version which more closer to the trunk and includes https://github.com/apple/sourcekit-lsp/pull/668 and set it to the settings which named Sourcekit-lsp: Server Path
git clone git@github.com:apple/sourcekit-lsp.git
export TOOLCHAINS=swift
swift package update
swift build