Comments (2)
Most everything is a framework search path, which headermaps won't work for -- we'd need a vfs overlay, and either way, this is how Xcode handles search paths for framework headers, and we don't want to deviate in behavior
from rules_ios.
Makes sense to me, I haven't tested using a VFS VS hmap recently but originally the hmap loaded a lot faster into memory and was faster for clang. This being aside, I noticed a few things when playing around with this locally:
A basic Xcode project with frameworks
Xcode puts built frameworks into single directory - tools would find the build frameworks at O(1) search cost if it gets the it the build directory in the search first - it seems to in my testing.
In practice, the tools like clang
swift
and ld
would up finding a matching dep framework in the build directory and won't search further.
Specifically the command lines always will have the first search path
-F/Path/toDerivedData/*/Build/Products/Debug-iphonesimulator
Cocoapods default behavior with a framework
Cocoapods version I'm running locally seems to put frameworks in their own directory, so even if xcode were to have the path as above it won't find them. This would implicate the O(N) deps searching as above, unless of course it is using a top level VFS or other mechanism to mitigate the search in clang
and swift
.
-F/Path/toDerivedData/*/Build/Products/Debug-iphonesimulator/DepA
-F/Path/toDerivedData/*/Build/Products/Debug-iphonesimulator/DepB
Mitigation going forward
I'm interested to see flame graphs and --profiling
output for any solution to this before and after
Perhaps a VFS could be a path to get it to the state of O(1) framework locating: vs having to search all the transitive framework paths. I'm interested to see how this can impact the search algorithms in clang and swift, and also the cost of serializing in the json vfs. Where hmap is a binary hash table that's fast to map in.
Also, the module cache can help here. When not pulling from a populated module cache, it might still be expensive and may be worth worth profiling. The header search cost is probably paid down multiple times with per OS modules: #225
from rules_ios.
Related Issues (20)
- Support or test case for .metal files HOT 2
- [xcodeproj] Support Xcode 14.x new index path HOT 4
- Support for bazel coverage command with dynamic apple_framework targets HOT 1
- [rules_swift] override tarball deps to either use .zip or source checkouts HOT 3
- Fix xcspec parsing in Xcode 14.2+
- Remove Bazel 5.x.x LTS support
- Plist issue when objc_library depends on apple_framework HOT 5
- How to enable bitcode when using `apple_framework`
- Add `cc_features`/`cc_toolchain` to `partials.framework_provider_partial` call HOT 1
- Allow `--experimental_strict_conflict_checks` to pass for XCFramework slices HOT 1
- Error Select is not iterable HOT 4
- [m1] arm64 automatic device dep simulator rules not working with RBE or caching
- `apple_framework_packing` with `link_dynamic=true` will cause error HOT 7
- Feature request: Add support for Bzlmod HOT 14
- Bug: Prebuilt XCFramework errors at `import` statements
- `bazel build //tests/ios/xcframeworks/Basic:xcframeworks` is failing HOT 2
- Bug : Build fails when depending on XCFrameworks generated by cocoapods-bazel HOT 1
- Bug - Build fails while building FirebaseCrashlytics Pod using cocoapods-bazel HOT 7
- Error: create_swift_module() got unexpected keyword argument: symbol_graph HOT 1
- `ctx.attr._product_type` always being set to `apple_product_type.static_framework` in `apple_framework_packaging` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_ios.