Skip to content

Commit 2ee5033

Browse files
authored
Merge pull request #81 from nikagar4epm/chore/readme_grammar_fixes
chore: updated Readme
2 parents b6c4d1c + 70e473e commit 2ee5033

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Readme.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
# Xcode-Build-Server
22

3-
apple's [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) doesn't support xcode project. but I found it provide a [build server protocol](https://build-server-protocol.github.io/docs/specification.html) to integrate with other build system. this is why I created this repo.
3+
Apple's [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) doesn't support xcode project. But I found it provides a [build server protocol](https://build-server-protocol.github.io/docs/specification.html) to integrate with other build system. This is why I created this repo.
44

5-
This repo aims to integrate xcode with sourcekit-lsp, support all languages(swift, c, cpp, objc, objcpp) xcode supports, so I can develop iOS with my favorate editor.
5+
This repo aims to integrate xcode with sourcekit-lsp and support all the languages (swift, c, cpp, objc, objcpp) xcode supports, so I can develop iOS with my favorate editor.
66

77
# Install
88

9-
this repo require Python3.9. The latest macos already contains this tool.
9+
This repo requires Python 3.9. The latest macOS already comes with this tool.
1010

11-
then just clone this repo, and `ln -s ABSPATH/TO/xcode-build-server /usr/local/bin`
11+
After you've made sure you have Python 3.9, just clone this repo, and add a symbolic link to your bin folder by running: `ln -s ABSPATH/TO/xcode-build-server /usr/local/bin`
1212

13-
here is script for quick install if your terminal cd to the dir you what save this repo:
13+
Here is a script for quick install if your working directory is your desired destination for the installation:
1414

1515
`git clone "[email protected]:SolaWing/xcode-build-server.git" && ln -s "$PWD"/xcode-build-server/xcode-build-server /usr/local/bin`
1616

1717
or
1818

1919
`git clone "https://github.com/SolaWing/xcode-build-server.git" && ln -s "$PWD"/xcode-build-server/xcode-build-server /usr/local/bin`
2020

21-
or install from brew
21+
or install using homebrew
2222

2323
`brew install xcode-build-server`
2424

25-
or install from [Macports](https://github.com/macports/macports-ports/blob/master/devel/xcode-build-server/Portfile):
25+
or install using [Macports](https://github.com/macports/macports-ports/blob/master/devel/xcode-build-server/Portfile):
2626

2727
`sudo port install xcode-build-server`
2828

2929
# Usage
3030

31-
choose one of the following usage. No matter which method you use, you need to ensure that the directory where `buildServer.json` is located is **the root directory** of lsp
31+
Choose one of the following methods. (No matter which method you use, you need to ensure that the directory where `buildServer.json` is created in is **the root/working directory** of the LSP)
3232

3333
### Bind to Xcode
3434
Go to your workspace directory and execute one of the following commands:
3535

3636
```bash
37-
# *.xcworkspace or *.xcodeproj should be unique. can be omit and will auto choose the unique workspace or project.
38-
# -scheme can also be omit to auto bind the latest scheme build result. even change it in xcode after the buildServer.json generated
37+
# *.xcworkspace or *.xcodeproj should be unique. This can be omitted and the build server will automatically choose the unique workspace or project.
38+
# -scheme can also be omitted to automatically bind the latest scheme build result. even change it in xcode after the buildServer.json generated
3939
xcode-build-server config -workspace *.xcworkspace -scheme <XXX>
4040
xcode-build-server config -project *.xcodeproj -scheme <XXX>
4141
```
4242

4343
This will create or update the `buildServer.json` file, with a `kind: xcode` key, which instructs xcode-build-server to watch and use compile flags from the newest xcode build log.
4444

45-
After this, you can open your file with sourcekit-lsp enabled, and it should works.
45+
After this, you can open your file with sourcekit-lsp enabled and it should work.
4646

4747
If your compile info is outdated and something is not working properly, just build in xcode to refresh compile flags.
4848

49-
> PS: xcodebuild can generate same build log as xcode, if you don't overwrite build dir and specify a -resultBundlePath. this way you don't have to open xcode to build. eg:
49+
> PS: xcodebuild can generate same build log as xcode if you don't overwrite build dir and specify a -resultBundlePath. This way you don't have to open xcode to build. eg:
5050
```bash
5151
rm .bundle; xcodebuild -workspace *.xcworkspace -scheme <XXX> -destination 'generic/platform=iOS Simulator' -resultBundlePath .bundle build
5252
```
@@ -65,41 +65,41 @@ this will parse the log, save compile info in a `.compile` file, and update `bui
6565

6666
`<build_log_file>` can be created by redirecting `xcodebuild build` output to a file, or exported from xcode's build log UI.
6767

68-
`<cmd generate build log>` will usually be xcodebuild, or `pbpaste` if copy from xcode's build log. for example:
68+
`<cmd generate build log>` will usually be xcodebuild, or `pbpaste` if copied from xcode's build log. for example:
6969

7070
```base
7171
xcodebuild -workspace *.xcworkspace -scheme <XXX> -configuration Debug build | xcode-build-server parse [-a]
7272
7373
pbpaste | xcode-build-server parse [-a]
7474
```
7575

76-
When running for the first time, **you need to ensure that the log is complete**, otherwise some files cannot obtain the correct flags.
76+
When running for the first time, **you need to ensure that the log is complete**, otherwise some files won't be able to obtain correct flags.
7777

7878
After completing these steps, restart your language server, and it should work as expected.
7979

80-
if your build environment changes(eg: add new files, switch sdk, toggle debug/release, conditional macro, etc..) and your language server stops working, just repeat the previous steps to update the compile info. In these incremental update cases, **you should make sure to use the `-a` flag**, which will only add new flags, and other irrelevant old flags will remain unchanged.
80+
If your build environment changes(eg: add new files, switch sdk, toggle debug/release, conditional macro, etc..) and your language server stops working, just repeat the previous steps to update the compile info. In these incremental update cases, **you should make sure to use the `-a` flag**, which will only add new flags, and other irrelevant old flags will remain unchanged.
8181

8282
if you use xcodebuild and want to see raw output, currently you can use the following commands: `xcodebuild ... | tee build.log; xcode-build-server parse -a build.log >/dev/null 2>&1`
8383

8484
### [Deprecated] Sync Xcodebuild log
85-
> this usage is deprecated by `bind xcodeproj`, which just a command and won't pollute your xcodeproj's config.
86-
> switch from this usage to `bind xcodeproj`, you'll need to delete the `post-build-action` first. Otherwise, bind may not work properly. since kind will change to manual by post-build-action.
85+
> this usage is deprecated by `bind xcodeproj`, which is just a command and won't pollute your xcodeproj's config.
86+
> switch from this usage to `bind xcodeproj`, you'll need to delete the `post-build-action` first. Otherwise, bind may not work properly. Since kind will change to manual by post-build-action.
8787
8888
xcode-build-server provider `post-build-action` script to auto parse newest log into .compile and generate `buildServer.json`.
8989
just add `xcode-build-server postaction | bash &` into script in **scheme -> Build -> Post-actions**. and script should choose provide build settings from target
9090
<img width="918" alt="图片" src="https://user-images.githubusercontent.com/3897953/178139213-cb655340-28f6-49f6-8e7d-666bb29e664f.png">
9191

92-
after this, the compile info should auto generate when xcode build and no need further manual parse.
92+
after this, the compile info should auto generate when xcode builds and no need for further manual parsing.
9393

9494
## Indexing While Building
95-
[sourcekit-lsp](https://github.com/apple/sourcekit-lsp#indexing-while-building) use indexing while build.
96-
if you found find definition or references is not work correctly, just build it to update index
95+
[sourcekit-lsp](https://github.com/apple/sourcekit-lsp#indexing-while-building) uses indexing while building.
96+
If you find that find definitions or references are not working correctly, just build it to update index
9797

9898
# More
9999

100-
current implementation is basicly work, but may have some rough edges. Please report issue if you have any problem. If you want to help, can check the open issue list. PR is always welcome.
100+
Current implementation is basicly working, but may have some rough edges. Please report issue if you have any problem. If you want to help, you can check the open issue list. PR's are always welcome.
101101

102-
when reporting an issue, you may provide your buildServer.json and run LSP with the environment variable SOURCEKIT_LOGGING=3 to provide detailed logs to help locate the problem.
102+
When reporting an issue, you may provide your buildServer.json and run LSP with the environment variable SOURCEKIT_LOGGING=3 to provide detailed logs to help locate the problem.
103103

104104
# Common Issues
105105

0 commit comments

Comments
 (0)