Comments (1)
Hi @dbworku,
Thanks for your interest!
Before I go into the steps we would need to get there, let's talk a bit about the proximal issue - duplicate classes.
Would it help if we published an aar that did not bundle any of these other libraries, as well as instructions on the full list of libraries to add to the build? This would be fairly doable (I think) and would not require full maven/gradle builds.
As for gradle, there are a number of considerations:
- The Java code would be pretty easy to deal with but the native code is where things get tricky. Our source of truth would always be buck build files, so having a tool that introspects the buck build graph and replicates it in cmake would be by far the easiest long-term approach (but with the highest upfront cost). There are, however, features of buck that are hard to replicate in cmake so we might need to refactor the code base significantly and impose new invariants before doing so.
a. For example, our usage ofheader_namespace
means that the cmake build will have to create a folder structure to symlink the headers into and expose that to dependent libraries. It's not impossible, just tedious to script.
b. Our usage ofheader_namespace
is questionable in its own right and I wouldn't be opposed to refactors that cleaned it up, so that e.g.cpp/
can be added as a header path across all compiler invocations.
c. An alternative naive approach would supply recording versions of the toolchain or inspect the buck logs to produce the exact same sequence of invocations via cmake. This would work fairly well but would be somewhat fragile. We could automate it, however, so that every commit landing in github has a correct CMakeLists generated. - Barring the automatic cmake conversion, another approach would be to have gradle shell out to buck and pull the built libraries that way. This unfortunately means we wouldn't pick up global flags without extra work and would impose a buck setup cost to people anyway. It's limited in utility but would unblock adding the library to existing projects, assuming that you are okay with the buck setup hurdle.
- Gradle/cmake will produce suboptimal results, size-wise. For example, this one line completely changes the way buck compiles the native code. It first produces object files, inspects which symbols libraries need from their dependencies and then hides all other symbols when linking the dependencies. This allows us to not worry about manually curating the dynamic symbol table and always produces optimal symbol tables. Replicating this functionality would be very difficult and as a result the gradle build is likely to be significantly bigger than the buck build.
Let me know if you're interested in either the no-deps aar build or the cmake conversion approaches, I'm happy to discuss them in more detail!
from profilo.
Related Issues (20)
- Migration Website to Docusaurus 2 Alpha HOT 3
- Unknown IDs in flame graph when stacks are produced HOT 5
- Missing framework frames information in stacktraces (pre-lollipop devices) HOT 2
- why libprofiloextapi.so not exits ? HOT 1
- How to keep collect stack safety in profiler? HOT 1
- Python scripts throws errors HOT 14
- Crash on API level 28 when SoLoader initialise the .so libraries HOT 6
- Meaning of CPU time in ProcessCounters HOT 3
- Meaning of Trace.In-Memory HOT 4
- NativeTracer HOT 1
- android 7.1.2 arm64 unwind support HOT 2
- profilo unwind cannot work on 6.0 with arm64 devices HOT 2
- How do I run the project on Android studio? HOT 2
- Is there a way to generate file that can be analyze by perfetto (systrace file)? HOT 1
- ANR when init Profilo? HOT 1
- How to getLineNum from unwind? HOT 1
- Stable for production usage? HOT 2
- Native code support (C/C++/Rust/Dart)? HOT 2
- dex version 39 can not get stacks HOT 1
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 profilo.