Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit 6d6a26b

Browse files
committed
4.5.1 release.
1 parent 20a162c commit 6d6a26b

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

BAZEL.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
### Experimental Bazel build system support.
22

3-
The [binary GitHub releases](https://github.com/johnno1962/InjectionIII/releases), version 4.5.* or above contain an initial implementation of injecting larger apps which have switched to using the [bazel](https://bazel.build/) build system.
3+
The [binary GitHub releases](https://github.com/johnno1962/InjectionIII/releases), version 4.5.* or above contain an initial implementation of injecting larger apps which have elected to use the [bazel build system](https://bazel.build/).
44

5-
In fact there are two implementations available. The default, more conservative implementation, searches the Xcode build logs for a line starting `Running "` where `bazel` is invoked and calls this command when a source file is modified. It then looks for object files that have been modified by the build and "injects" then in the way the InjectionIII has up until now. To use this version download one of the binary 4.5+ releases of the InjectionIII app, run it and add the following bundle load code somewhere in your app's initialisation:
5+
In fact, there are two implementations available. A more conservative implementation, searches the Xcode build logs for a line starting `Running "` where `bazel` is invoked and calls this command when a source file is modified. It then looks for object files that have been modified by the build and "injects" then in the way the InjectionIII has up until now. To use this version download one of the binary 4.5+ releases of the InjectionIII app, run it and add the following bundle load code somewhere in your app's initialisation:
66

77
```
88
#if DEBUG
@@ -11,6 +11,8 @@ Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bun
1111
```
1212
When your app starts a file open panel will appear asking you to select the project's root directory which will be used to start a "file watcher" watching for modifications to Swift source files. In theory, if you have used [tulsi](https://github.com/bazelbuild/tulsi) to create your Xcode project, when you save a file, the InjectionIII app will see the `bazel` invocation in the build logs and use it to recompile the project sources and inject the object files that were updated. Note: it's important to the `--linkopt="-Wl,interposable"` either in your Xcode project's build phase that invokes `bazel` or in the relevant BUILD file.
1313

14-
There is a second less conservative implementation that you should find injects code modifications more quickly. To use this version, quit the InjectionIII app and restart your app. When you save a file, this version (if it finds a WORKSPACE file in a directory somewhere above the source file changed) will only recompile the module of Swift file modified rather than a do full `bazel` rebuild. It then injects object files modified as before. To do this, this version very slightly patches your `bazel` installation to make a link available in /tmp/bazel_ModuleName.params to preserve the parameters file `bazel` passed directly to `swiftc` to incrementally recompile the module in the last build.
14+
There is a second less conservative implementation that you should find injects code modifications more quickly. To use this version, quit the InjectionIII app and restart your app to use "standalone" injection. When you save a file, this version (if it finds a WORKSPACE file in a directory somewhere above the source file changed) will only recompile the module of Swift file modified rather than a do full `bazel` rebuild. It then injects object files modified as before. To do this, this version very slightly patches your `bazel` installation to make a link available in /tmp/bazel_ModuleName.params to preserve the parameters file `bazel` passed directly to `swiftc` to incrementally recompile the module in the last build.
1515

1616
InjectionIII, using the version with or without the app running works best if you don't use "Whole module optimization" otherwise, all object files are regenerated and injection has to resort to heuristics to determine which other objects will be included to cover "shared hidden symbols" resulting in slower iteration times. For more details on the evolution of this feature consult the original [github issue](https://github.com/johnno1962/InjectionIII/issues/388).
17+
18+
$Date: 2022/11/15 $

InjectionIII.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
BB80B3B426B573BE0055FAAE /* README_Chinese.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README_Chinese.md; sourceTree = "<group>"; };
253253
BB9642A527E339BC00C61CB7 /* ObjcInjection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ObjcInjection.swift; path = HotReloading/Sources/HotReloading/ObjcInjection.swift; sourceTree = SOURCE_ROOT; };
254254
BB9642A727E33C8F00C61CB7 /* DeviceInjection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DeviceInjection.swift; path = HotReloading/Sources/HotReloading/DeviceInjection.swift; sourceTree = SOURCE_ROOT; };
255+
BB9DE2302923C3B000926B1B /* BAZEL.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = BAZEL.md; sourceTree = "<group>"; };
255256
BBA7BE0223473D660067124D /* build_bundles.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_bundles.sh; sourceTree = "<group>"; };
256257
BBAD6A2B290915DB00DEB1A5 /* InjectionStats.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = InjectionStats.swift; path = HotReloading/Sources/HotReloading/InjectionStats.swift; sourceTree = SOURCE_ROOT; };
257258
BBB040631FB1798A007DDD0A /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/ScriptingBridge.framework; sourceTree = DEVELOPER_DIR; };
@@ -394,6 +395,7 @@
394395
BB037DF31FAD808B004B267C /* README.md */,
395396
BB80B3B426B573BE0055FAAE /* README_Chinese.md */,
396397
BB596EE127AAC5A6009B6241 /* ROADMAP.md */,
398+
BB9DE2302923C3B000926B1B /* BAZEL.md */,
397399
BB6125D224EA882000A7C230 /* Injection.jar */,
398400
BBCA01FF1FB0F10300E45F0F /* InjectionIII */,
399401
BBCA02461FB1065D00E45F0F /* InjectionBundle */,

InjectionIII/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleVersion</key>
22-
<string>7580</string>
22+
<string>7581</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.developer-tools</string>
2525
<key>LSMinimumSystemVersion</key>

0 commit comments

Comments
 (0)