- components/discardable_memory
- components/download
- components/filename_generation
- components/services/font
- components/services/filesystem
- components/services/font
- components/services/leveldb
- components/session_manager
- components/link_header_util
- components/metrics
- components/network_session_configurator
- components/offline_pages
- components/payments
- components/profile_service
- components/rappor
- components/tracing
- components/ukm
- components/url_formatter
- components/viz
- components/cbor
By default, components can depend only on the lower layers of the Chromium codebase (e.g. base/, net/, etc.). Individual components may additionally allow dependencies on the content API and IPC; however, if such a component is used by Chrome for iOS (which does not use the content API or IPC), the component will have to be in the form of a layered component (http://www.chromium.org/developers/design-documents/layered-components-design).
This sounds like you should be able to place such code under components/. And it's clear from the list you give that content/ *definitely* depends on content/ today, despite what the documentation states for it.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAGD3t5Fb4%2BMB5GC_9Fp8Jj55sS3f7YgDh3YY%2Bv9_w4G_qgMd4A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACnJMqr2%2B105zybhjxbducPvN1K3Pa3sPJAmz1ft%2BKkDcxZ6eg%40mail.gmail.com.
Thanks! I think that anything that we can do to mitigate //components becoming //lib would be beneficial, and that relayering //content strictly below //components would be a big step in that direction. I'm definitely aware that we've had discussions like this at several times in the past years and always concluded that the best thing was essentially to leave the status quo in place, but in my experience engineers' confusion about what //components is only continues to grow over time.
The concrete thing that we lose by giving up (in the limit) on any global layering rules is the ability to envision where //components is in the Chromium layercake. For a given subdirectory in //components, it would be necessary to understand exactly what that subdirectory is to know what it can depend on and what can depend on it.
FWIW I think introducing a new type of components would add to the confusion. I'm still wondering what the answer is to my questions below.On Fri, Mar 29, 2019 at 10:12 AM Colin Blundell <blun...@chromium.org> wrote:Hi Ben,Thanks! I think that anything that we can do to mitigate //components becoming //lib would be beneficial, and that relayering //content strictly below //components would be a big step in that direction. I'm definitely aware that we've had discussions like this at several times in the past years and always concluded that the best thing was essentially to leave the status quo in place, but in my experience engineers' confusion about what //components is only continues to grow over time.
Best,ColinOn Thu, Mar 28, 2019 at 6:32 PM Ben Goodger <b...@chromium.org> wrote:I recall having this discussion at various points. My sense was that at large within Chromium developers think of //components as //lib, and so reasoning about precise dependencies is quite hard to intuit at scale beyond just what DEPS and .gn files articulate for individual components...-BenOn Thu, Mar 28, 2019 at 10:30 AM Colin Blundell <blun...@chromium.org> wrote:I'm not close enough at this point to answer the questions about duplication between //content and //ios/web, but wrt growing multiple components directories: I think that //content is fundamental enough to merit a clear separation in the codebase between "features that //content depends on" and "features that depend on //content". I wouldn't view this separation as precedent for creating new top-level directories for "features that can sit below //<foo>" as opposed to "features that can sit above //<foo>".Best,ColinOn Thu, Mar 28, 2019 at 6:24 PM John Abd-El-Malek <j...@chromium.org> wrote:The questions I'd have are:-how much is duplicated between content and ios?
-what is the cost of that duplication (clearly it's non-zero)?
-what is the cost of adding new concepts to users?
Thank you, François!Re: your two possible outcomes:- Today, individual components can sit above or below //content, as you've illustrated.- This thread has indicated that at a high level we prefer maintaining this status quo to other possible organizations (e.g., outcome #2, which is my preferred outcome for the reasons I've outlined above and your reason of "preferr[ing] clear dependency rules for top-level directories").Given those facts, it certainly looks like we're going toward outcome #1. I see two remaining questions to resolve:1. Should //ios/web and //content be allowed to share code via //components?2. What should the definition of //components be if we go in this direction, given how far it has drifted from its original purpose of "high-level browser features used by multiple embedders"?My answers:1. I don't see any reason why not, given that both //content and //ios/web now depend on //components.2. I would simply use my augmented variant of PK's definition: "//components contains subdirectories that are isolated pieces that can express a fine-grained dependency graph and are used in multiple places throughout the source tree." This explicitly eliminates any global meaning of //components in the layering of the tree.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALhVsw2U5Hf-YCSq-8MZRJiRdyD%2BEp%3DQ%3D35eN_qyFkZErn3WDg%40mail.gmail.com.
To be clear, I'm not saying I'm opposed to code sharing between non-iOS. This is why we have components/ in the first place :)
I'm just saying to share something between src/content and src/ios, we should examine everything on a case-by-case basis. This is a new need for sharing with iOS, as before it was src/chrome that needed to be split. Most of the features that were shared there were each many times bigger than the 1000 lines quoted below. src/content is already overly complex, and it's used by a lot more than src/chrome, so I want to be very mindful about slowing development there (death by a thousand cuts). For browser threads for example, most have already been eliminated and I'm aiming that for pretty much most code knowledge of BrowserThread::IO should go away.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALhVsw1PMcXCtUexSdw%3DmWFxkyO2w61WEtEVyqJMU3L3gy61LA%40mail.gmail.com.
On Tue, 2 Apr 2019 at 22:18, John Abd-El-Malek <j...@chromium.org> wrote:To be clear, I'm not saying I'm opposed to code sharing between non-iOS. This is why we have components/ in the first place :)
I'm just saying to share something between src/content and src/ios, we should examine everything on a case-by-case basis. This is a new need for sharing with iOS, as before it was src/chrome that needed to be split. Most of the features that were shared there were each many times bigger than the 1000 lines quoted below. src/content is already overly complex, and it's used by a lot more than src/chrome, so I want to be very mindful about slowing development there (death by a thousand cuts). For browser threads for example, most have already been eliminated and I'm aiming that for pretty much most code knowledge of BrowserThread::IO should go away.That's interesting. I've not heard of this effort before, why do we want to do that? :)
## How does this differ from //components
Both //components and //base/util contain subdirectories that are (a) intended
for reuse. In addition, //components imposes no global layering in Chromium, so
a subdirectory placed in //components can be used from most-to-all layers in the
codebase, subject to the dependencies that that subdirectory itself holds.
In spite of these similarities, there are *conceptual* differences: //components
contains things are closer to full features or subsystems (eg autofill, heap
profiler, cloud devices, visited link tracker) that are not really intended for
large scale reuse.
There is some overlap and at some point it will become a judgment call, but
in general, //components are a better fit if the code in question is a feature
module, or subsystem. //base/util is better if it is a more narrow construct
such as a data structure, coding primitive, etc.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAPG_qM6sM7W3ch%2BDzL7W%3DHiGJ7r1WVuecXpG89R82Jh7u7NTpw%40mail.gmail.com.
In spite of these similarities, there are *conceptual* differences: //componentscontains things are closer to full features or subsystems (eg autofill, heap
profiler, cloud devices, visited link tracker) that are not really intended for
large scale reuse.