<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>71237</bug_id>
          
          <creation_ts>2011-10-31 14:12:24 -0700</creation_ts>
          <short_desc>BaselineOptimizer tests should use mocks instead of real Executive/FileSystem objects</short_desc>
          <delta_ts>2022-02-27 23:47:19 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Eric Seidel (no email)">eric</assigned_to>
          <cc>abarth</cc>
    
    <cc>dbates</cc>
    
    <cc>dpranke</cc>
    
    <cc>ojan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>493490</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 14:12:24 -0700</bug_when>
    <thetext>BaselineOptimizer tests should use mocks instead of real Executive/FileSystem objects</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493492</commentid>
    <comment_count>1</comment_count>
      <attachid>113086</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 14:16:32 -0700</bug_when>
    <thetext>Created attachment 113086
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493500</commentid>
    <comment_count>2</comment_count>
      <attachid>113086</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-10-31 14:31:13 -0700</bug_when>
    <thetext>Comment on attachment 113086
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=113086&amp;action=review

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py:-34
&gt; -def _baseline_search_hypergraph(fs):

I think it is better to be explicit about the objects that you depend on, rather than looking for a global context-like object, like host.

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py:47
&gt; +        port = port_factory.get(port_name)

Why aren&apos;t you passing the filesystem to the port any more?

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py:67
&gt; +    def __init__(self, host):

Same comment as above, I think it is better to be explicit about the objects that you depend on, rather than looking for a global context-like object, like host.

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:39
&gt; +        BaselineOptimizer.__init__(self, MockHost())

Same comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493504</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 14:42:29 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 113086 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=113086&amp;action=review
&gt; Same comment as above, I think it is better to be explicit about the objects that you depend on, rather than looking for a global context-like object, like host.

Unfortunately, that gets us into the trouble we have now.  Since Port is explicit about what it depends on, and you are expected to pass it an Executive, User, and FileSystem, parts of code which fail to do so, aren&apos;t mockable.  Part of this is the confusion of Port with some sort of Host object.  Passing Host here, makes it easy to mock these calls.  If they need to talk out to the OS, they do so via Host.  Whether that&apos;s via Executive, Filesystem or User objects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493505</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 14:44:15 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 113086 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=113086&amp;action=review
&gt; &gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py:47
&gt; &gt; +        port = port_factory.get(port_name)
&gt; 
&gt; Why aren&apos;t you passing the filesystem to the port any more?

It&apos;s no longer needed.  It just happens that port_factory is the same name as the module used to be imported as.  But now it&apos;s a PortFactory instance, which contains all the information needed to wire up a Port with the proper Executive, User, etc.  Previously we only had a FileSystem, so we passed that, since that was better than nothing.  Now we have a Host, and better yet, we have a PortFactory from that host, so we just get the port we want, knowing that it will be properly wired up with the right Executive, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493509</commentid>
    <comment_count>5</comment_count>
      <attachid>113087</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 14:53:48 -0700</bug_when>
    <thetext>Created attachment 113087
Make our PortFactory mocking slightly more explicit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493510</commentid>
    <comment_count>6</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-10-31 14:55:40 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 113086 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=113086&amp;action=review
&gt; &gt; Same comment as above, I think it is better to be explicit about the objects that you depend on, rather than looking for a global context-like object, like host.
&gt; 
&gt; Unfortunately, that gets us into the trouble we have now.  Since Port is explicit about what it depends on, and you are expected to pass it an Executive, User, and FileSystem, parts of code which fail to do so, aren&apos;t mockable.  Part of this is the confusion of Port with some sort of Host object.  Passing Host here, makes it easy to mock these calls.  If they need to talk out to the OS, they do so via Host.  Whether that&apos;s via Executive, Filesystem or User objects.

I understand what you&apos;re aiming towards; the problem is that the MockHost includes a whole bunch of other objects as well (a SCM object, a Bugzilla object, etc.), and by switching to that, you lose visibility into the fact that you *only* need an executive, a user, and a filesystem.

Perhaps part of the problem is that it&apos;s not clear to me what a &quot;host&quot; is supposed to be. Is it supposed to truly be just things like those three objects (i.e., pointers to stuff in common/system), or a bigger catch-all class? If the former, I&apos;m okay with that (and agree that it will be good to split this out from Port). But I&apos;m not okay with the latter.

(In reply to comment #4)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 113086 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=113086&amp;action=review
&gt; &gt; &gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py:47
&gt; &gt; &gt; +        port = port_factory.get(port_name)
&gt; &gt; 
&gt; &gt; Why aren&apos;t you passing the filesystem to the port any more?
&gt; 
&gt; It&apos;s no longer needed.  

Ah, sorry, I missed the insertion on line 45. I follow it now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493511</commentid>
    <comment_count>7</comment_count>
      <attachid>113087</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-10-31 14:58:08 -0700</bug_when>
    <thetext>Comment on attachment 113087
Make our PortFactory mocking slightly more explicit

View in context: https://bugs.webkit.org/attachment.cgi?id=113087&amp;action=review

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:41
&gt; +        host.port_factory = PortFactory(host)  # We want a real PortFactory, but it should use mocks.

Okay, I&apos;m lost again. Why does the host have a port_factory? That seems like a layering inversion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493658</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 17:26:17 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (From update of attachment 113087 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=113087&amp;action=review
&gt; 
&gt; &gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:41
&gt; &gt; +        host.port_factory = PortFactory(host)  # We want a real PortFactory, but it should use mocks.
&gt; 
&gt; Okay, I&apos;m lost again. Why does the host have a port_factory? That seems like a layering inversion.

Host has historically just been where all the Mock-able singletons have gone.  PortFactory is one of them.  We could certainly split Host and have an additional layer for higher-level mockable singletons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493677</commentid>
    <comment_count>9</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-10-31 17:48:53 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; (From update of attachment 113087 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=113087&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:41
&gt; &gt; &gt; +        host.port_factory = PortFactory(host)  # We want a real PortFactory, but it should use mocks.
&gt; &gt; 
&gt; &gt; Okay, I&apos;m lost again. Why does the host have a port_factory? That seems like a layering inversion.
&gt; 
&gt; Host has historically just been where all the Mock-able singletons have gone.  PortFactory is one of them.  We could certainly split Host and have an additional layer for higher-level mockable singletons.

Okay, I am definitely opposed to having one catch-all object that contains singletons from multiple layers. I would probably be okay with a version of this change that had a &quot;host&quot; object that contained singletons only for things in common/system, since that is a clear layer and set of functionality, although I still don&apos;t think I prefer that to requiring the specific objects that are needed.

It would be good if we separated out the concept of &quot;hosts&quot; from &quot;mockable objects&quot;, though. I think that is making things unnecessarily confusing (to me, at least).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493704</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 18:35:19 -0700</bug_when>
    <thetext>So if I&apos;m looking for this same functionality, of having BaselineOptimizer not actually touch the filesystem (or launch processes) while running the unittests, how would you compose the change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493705</commentid>
    <comment_count>11</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-10-31 18:38:49 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; Okay, I am definitely opposed to having one catch-all object that contains singletons from multiple layers. I would probably be okay with a version of this change that had a &quot;host&quot; object that contained singletons only for things in common/system, since that is a clear layer and set of functionality, although I still don&apos;t think I prefer that to requiring the specific objects that are needed.

I think the layers are at best il-defined.  Port for example, is supposed to be rather low on the dependency chain, yet it&apos;s the &quot;god object&quot; for NRWT.  Port holds NRWT&apos;s Executive and Filesystem.  We&apos;d like to fix that, but for now, when instantiating port objects we have to be very careful to pass them the current FileSystem/Executive/User or the unittests touch the real filesystem.

This change is about making BaselineOptimizer pass the Host along to the Port, effectively, through the PortFactory (since that&apos;s the preferred way to make ports).  The real layering violation of which you speak is that Port is the Host for NRWT.  Until we fix that we basically need to pass a Host through any object which intends to create Port objects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493708</commentid>
    <comment_count>12</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-10-31 18:48:04 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; So if I&apos;m looking for this same functionality, of having BaselineOptimizer not actually touch the filesystem (or launch processes) while running the unittests, how would you compose the change?

Assuming I am following the code properly, I would pass a MockExecutive object and a MockFilesystem object to the TestBaselineOptimizer constructor, since the port will use a real user but we probably don&apos;t care about that. If I was being pedantic/thorough, I would pass a MockUser as well. I would not use the PortFactory object, since it takes host objects but those are not defined outside of the MockHost object. Alternatively, would create a default host object in common/system/host, and then allow myself to use MockHost. 

I don&apos;t think the (MockHost) host object should have a member called port_factory. That seems like it is just inviting trouble and isn&apos;t needed in this case, but maybe I&apos;m missing something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493711</commentid>
    <comment_count>13</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-10-31 18:58:13 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #9)
&gt; &gt; Okay, I am definitely opposed to having one catch-all object that contains singletons from multiple layers. I would probably be okay with a version of this change that had a &quot;host&quot; object that contained singletons only for things in common/system, since that is a clear layer and set of functionality, although I still don&apos;t think I prefer that to requiring the specific objects that are needed.
&gt; 
&gt; I think the layers are at best il-defined.  Port for example, is supposed to be rather low on the dependency chain, yet it&apos;s the &quot;god object&quot; for NRWT.  Port holds NRWT&apos;s Executive and Filesystem.  We&apos;d like to fix that, but for now, when instantiating port objects we have to be very careful to pass them the current FileSystem/Executive/User or the unittests touch the real filesystem.

I think we agree that the layers are ill-defined and where we eventually want to be; we might just be disagreeing over the path to get there. 

I would be happy to see filesystem, executive, and user objects be mandatory in the port constructors, and for them to be explicitly passed to most if not all other constructors under webkitpy.layout_tests; I would also -- as I attempted to describe above -- be happy to see a common.system-level &quot;host&quot; replace those three params (I put &quot;host&quot; in quotes here because I don&apos;t want to confuse this with the MockHost object that currently holds a bunch of other mocks as well). I don&apos;t think such a system-level host wants or needs a handle to a port_factory object, but maybe I am wrong?

I&apos;m not positive, but I think I&apos;ve removed most of the places where we need to retrieve a filesystem from the port elsewhere in NRWT. It shouldn&apos;t be too hard to remove the few others that remain. There may be a few places that need to retrieve port.executive, but those shouldn&apos;t be too hard to fix, either. If you don&apos;t get to this before then, I would be happy to try and put together a patch to that effect tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494796</commentid>
    <comment_count>14</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-11-02 12:13:27 -0700</bug_when>
    <thetext>&gt; Perhaps part of the problem is that it&apos;s not clear to me what a &quot;host&quot; is supposed to be.

In webkitpy, our design philosophy has been to avoid instantiating object from the global static scope when those objects interact with the outside environment (e.g., create processes, touch the file system, or interact with the network).

The &quot;host&quot; object is just an object to carry these dependencies around explicitly.  Rather then instantiating these objects from the global static scope, we retrieve them from the host.  The goal of those design is to make it easier to be able to write tests that do not have dependencies on the outside world.

This approach has worked very well for us, at least for code that was developed as part of webkitpy.  Code that we&apos;ve imported from elsewhere often hasn&apos;t been designed with this philosophy in mind.  In the case of NRWT, we&apos;ve retrofitted some of this idea onto the code using the Port abstraction, but currently the Port abstraction is too broad.  There&apos;s a lot of code in NRWT that gets things from Port that have nothing to do with ports of WebKit.

Over time, we&apos;d like to integrate NRWT better with the rest of webkitpy, which means infusing the Host object throughout NRWT.  I haven&apos;t looked at this patch specifically, but from reading the comments, that appears to be what Eric is doing here.

There&apos;s certainly a tradeoff in this design between using Python&apos;s import mechanism to create clean abstraction layers and removing dependencies on statics.  Ideally the language would let give us an import-like mechanism for controlling the names available in the host namespace in the same way that it lets us control the names available in the global scope.  Unfortunately, Python doesn&apos;t provide this facility, so we pay some cost for this design.  Over time, we might want to break Host down into sub objects for each layer, which might make it easier to catch layering violation in code review.

&gt; I would be happy to try and put together a patch to that effect tomorrow.

I didn&apos;t see this patch in my bugmail.  (Although, admittedly, I did have hundreds of bugmails to wade through.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494797</commentid>
    <comment_count>15</comment_count>
      <attachid>113087</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-11-02 12:17:43 -0700</bug_when>
    <thetext>Comment on attachment 113087
Make our PortFactory mocking slightly more explicit

View in context: https://bugs.webkit.org/attachment.cgi?id=113087&amp;action=review

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:35
&gt; +from webkitpy.tool.mocktool import MockHost

We should move MockHost to common now that we&apos;ve moved Host to common.  As written, Dirk is correct that importing tool packages in common is a layering violation.

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:59
&gt; +        host.port_factory = PortFactory(host)  # We want a real PortFactory, but it should use mocks.

Perhaps that&apos;s what the default port_factory on MockHost should be?

&gt; Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:139
&gt; +        # FIXME: What functionality does this rely on?  When can we remove this if?

I should have made a more detailed comment.  This can probably be uncommented if we&apos;ve succeeded in injecting all the dependencies.

&gt; Tools/Scripts/webkitpy/tool/commands/rebaseline.py:119
&gt; -        self._baseline_optimizer = BaselineOptimizer(tool.scm(), tool.filesystem)
&gt; +        self._baseline_optimizer = BaselineOptimizer(tool)

We should do a global search-and-replace for tool -&gt; host.  It&apos;s way past time for that.

&gt; Tools/Scripts/webkitpy/tool/mocktool.py:842
&gt; -class MockTool(object):
&gt; +class MockHost(object):

This should move to common.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494818</commentid>
    <comment_count>16</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-11-02 12:43:47 -0700</bug_when>
    <thetext>((In reply to comment #14)
&gt; &gt; Perhaps part of the problem is that it&apos;s not clear to me what a &quot;host&quot; is supposed to be.
&gt; 
&gt; In webkitpy, our design philosophy has been to avoid instantiating object from the global static scope when those objects interact with the outside environment (e.g., create processes, touch the file system, or interact with the network).
&gt; 

I certainly agree with this design philosophy. 

&gt; The &quot;host&quot; object is just an object to carry these dependencies around explicitly.  Rather then instantiating these objects from the global static scope, we retrieve them from the host.  The goal of those design is to make it easier to be able to write tests that do not have dependencies on the outside world.
&gt;

I definitely agree with the second sentence of this. I am less enthusiastic about the first sentence, because a using a single global context, while convenient, can obscure what the true dependencies are. 

What I was attempting to get at with my comment was that I didn&apos;t know what the type signature of the host was supposed to be (i.e., what the interface is). What things should be hung off the host, and what shouldn&apos;t?

&gt; There&apos;s certainly a tradeoff in this design between using Python&apos;s import mechanism to create clean abstraction layers and removing dependencies on statics.  Ideally the language would let give us an import-like mechanism for controlling the names available in the host namespace in the same way that it lets us control the names available in the global scope.  Unfortunately, Python doesn&apos;t provide this facility, so we pay some cost for this design.  Over time, we might want to break Host down into sub objects for each layer, which might make it easier to catch layering violation in code review.
&gt; 

Given that the Port class already has the mechanisms needed to catch layering violations (by taking the filesystem, user, executive objects directly), I don&apos;t want to lose that. That is what I am objecting to.

If we had some concept of a &quot;SystemHost&quot; (for lack of a better word) that was being passed to the port, that would be better. The generic Host could then contain a system_host as a field, rather than containing a filesystem, executive, etc. Alternatively (and less satisfactorily), the Host could derive from SystemHost. 

&gt; &gt; I would be happy to try and put together a patch to that effect tomorrow.
&gt; 
&gt; I didn&apos;t see this patch in my bugmail.  (Although, admittedly, I did have hundreds of bugmails to wade through.)

Yeah, sorry, I was occupied with my primary task these days and didn&apos;t have time for it. I will try to get to it today, but I don&apos;t believe that such a patch is holding up anything on this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494831</commentid>
    <comment_count>17</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-11-02 13:01:50 -0700</bug_when>
    <thetext>&gt; What I was attempting to get at with my comment was that I didn&apos;t know what the type signature of the host was supposed to be (i.e., what the interface is). What things should be hung off the host, and what shouldn&apos;t?

Generally, any object that reads or writes the environment (e.g., disk, network) should be obtained from the Host, either directly (as a property of the host) or from an object that was obtained from the host.  For example, we could move SCM from Host to Checkout, which we get from the host.

&gt; Given that the Port class already has the mechanisms needed to catch layering violations (by taking the filesystem, user, executive objects directly), I don&apos;t want to lose that. That is what I am objecting to.

As part of this process, we&apos;d like to reduce the scope of things the Port needs to worry about.  Today the Port object is concerned with a great many things that are unrelated to ports of WebKit.  These concerns should be separated.  That net result of that process is that much of the code that today holds a Port object will in the future hold a Host object.  If it needs the Port, it can get it from the Host.

&gt; If we had some concept of a &quot;SystemHost&quot; (for lack of a better word) that was being passed to the port, that would be better. The generic Host could then contain a system_host as a field, rather than containing a filesystem, executive, etc. Alternatively (and less satisfactorily), the Host could derive from SystemHost. 

Yeah, in the future, we&apos;ll probably want to break the Host object down by layers.  However, I don&apos;t think we should block this patch on that refactoring.

&gt; Yeah, sorry, I was occupied with my primary task these days and didn&apos;t have time for it. I will try to get to it today, but I don&apos;t believe that such a patch is holding up anything on this bug.

Code should not be obtaining the Executive from the Port.  The executive facilities of the environment are not related to ports of WebKit.  Rather, that code should get the executive from the Host, which will require plumbing the Host object deeper into NRWT.

Changing code to get the Executive from the Port might be worth doing, but we can also wait until Host is more prevalent throughout NRWT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494915</commentid>
    <comment_count>18</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-11-02 14:34:09 -0700</bug_when>
    <thetext>(In reply to comment #17)
&gt; &gt; What I was attempting to get at with my comment was that I didn&apos;t know what the type signature of the host was supposed to be (i.e., what the interface is). What things should be hung off the host, and what shouldn&apos;t?
&gt; 
&gt; Generally, any object that reads or writes the environment (e.g., disk, network) should be obtained from the Host, either directly (as a property of the host) or from an object that was obtained from the host.  For example, we could move SCM from Host to Checkout, which we get from the host.
&gt; 

To clarify, by &quot;network&quot; do you mean something like comon.system.url_fetcher or common.net.bugzilla.? I would normally call the latter a service, and the &quot;net&quot; is something of a misnomer (but terminology is not all that important as long as we understand each other). 

As I said before, Port implementations can depend on stuff in webkitpy.common.system but it&apos;s not clear to me that anything else should be allowed, and I am loathe to propagate coding patterns that will allow other dependencies to creep in unnoticed.
 
&gt; As part of this process, we&apos;d like to reduce the scope of things the Port needs to worry about.  Today the Port object is concerned with a great many things that are unrelated to ports of WebKit.  These concerns should be separated.  That net result of that process is that much of the code that today holds a Port object will in the future hold a Host object.  If it needs the Port, it can get it from the Host.

I have filed bug 71403 to track what we think should be split out from the Port object. While I believe that we all agree on the general claim, I would be very surprised if we agreed on the details. Please take a look and comment there :)

&gt; Code should not be obtaining the Executive from the Port.  The executive facilities of the environment are not related to ports of WebKit. 

Agreed. At least under webkitpy.layout_tests, today no code does this. A perhaps slightly better example is the filesystem, which is referenced in a couple places and is the thing I was talking about fixing in the separate patch.

&gt;  Rather, that code should get the executive from the Host, which will require plumbing the Host object deeper into NRWT.

I think this is the part that we disagree about somewhat. 

I would say that code that needs an executive should be passed an executive, not passed a host from which it can get an executive. Accordingly, NRWT doesn&apos;t need to know about Hosts at all. That said, I obviously don&apos;t want to get into a situation where you have to pass 20 arguments to every constructor, so some form of aggregation is appropriate. I just don&apos;t believe in the &quot;one Host to rule them all&quot; aggregate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494940</commentid>
    <comment_count>19</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-11-02 14:56:04 -0700</bug_when>
    <thetext>&gt; To clarify, by &quot;network&quot; do you mean something like comon.system.url_fetcher or common.net.bugzilla.? I would normally call the latter a service, and the &quot;net&quot; is something of a misnomer (but terminology is not all that important as long as we understand each other). 

Ideally, bugzilla would be built on top of a mockable abstraction of the network.  Unfortunately, it&apos;s not, so using that class directly causes side effects.

&gt; I would say that code that needs an executive should be passed an executive, not passed a host from which it can get an executive.

Yes.  We disagree about that point.  The design we&apos;ve been using in webkitpy is to supply a Host in most cases.  In some cases where it&apos;s clear only an executive will be needed, we pass just the Executive, but that&apos;s not the common case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494967</commentid>
    <comment_count>20</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-11-02 15:25:38 -0700</bug_when>
    <thetext>I&apos;m going to land this and start work on more cleanup.  I&apos;m glad we had this discussion!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494969</commentid>
    <comment_count>21</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-11-02 15:26:09 -0700</bug_when>
    <thetext>Committed r99106: &lt;http://trac.webkit.org/changeset/99106&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113086</attachid>
            <date>2011-10-31 14:16:32 -0700</date>
            <delta_ts>2011-10-31 14:53:44 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-71237-20111031141631.patch</filename>
            <type>text/plain</type>
            <size>9009</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTg4NzcKZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBi
L1Rvb2xzL0NoYW5nZUxvZwppbmRleCBiY2E0YTIzZDUyODZhYjFkMWIxNDE4ZTllZGM4NWI4MGVl
MTZiNWI0Li5kNTFlYzEyNTg4ZTU5NmMwYjcyN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gICByZXR1cm4g
c2VsZi5fcG9ydAotCiAKIGNsYXNzIE1vY2tCcm93c2VyKG9iamVjdCk6CiAgICAgcGFyYW1zID0g
e30K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113087</attachid>
            <date>2011-10-31 14:53:48 -0700</date>
            <delta_ts>2022-02-27 23:47:19 -0800</delta_ts>
            <desc>Make our PortFactory mocking slightly more explicit</desc>
            <filename>bug-71237-20111031145347.patch</filename>
            <type>text/plain</type>
            <size>9652</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTg4NzcKZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBi
L1Rvb2xzL0NoYW5nZUxvZwppbmRleCBiY2E0YTIzZDUyODZhYjFkMWIxNDE4ZTllZGM4NWI4MGVl
MTZiNWI0Li5kNTFlYzEyNTg4ZTU5NmMwYjcyNzYwNTJlMWI1YWRmNGYyY2ExYjE0IDEwMDY0NAot
LS0gYS9Ub29scy9DaGFuZ2VMb2cKKysrIGIvVG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDUgKzEsMjIg
QEAKIDIwMTEtMTAtMzEgIEVyaWMgU2VpZGVsICA8ZXJpY0B3ZWJraXQub3JnPgogCisgICAgICAg
IEJhc2VsaW5lT3B0aW1pemVyIHRlc3RzIHNob3VsZCB1c2UgbW9ja3MgaW5zdGVhZCBvZiByZWFs
IEV4ZWN1dGl2ZS9GaWxlU3lzdGVtIG9iamVjdHMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTcxMjM3CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZ
IChPT1BTISkuCisKKyAgICAgICAgQ2FsbGluZyB0aGUgc3RhdGljIHZlcnNpb24gb2YgZmFjdG9y
eS5nZXQoKSB3aXRoIHByb3BlciBtb2NraW5nCis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m9taXVtX2J1aWxkYm90KHNlbGYpOgogICAg
ICAgICByZXR1cm4gc2VsZi5fY2hyb21pdW1fYnVpbGRib3QKIApAQCAtODgxLDEyICs4ODQsMTEg
QEAgY2xhc3MgTW9ja1Rvb2wob2JqZWN0KToKICAgICBkZWYgaXJjKHNlbGYpOgogICAgICAgICBy
ZXR1cm4gc2VsZi5faXJjCiAKKworY2xhc3MgTW9ja1Rvb2woTW9ja0hvc3QpOgogICAgIGRlZiBw
YXRoKHNlbGYpOgogICAgICAgICByZXR1cm4gImVjaG8iCiAKLSAgICBkZWYgcG9ydChzZWxmKToK
LSAgICAgICAgcmV0dXJuIHNlbGYuX3BvcnQKLQogCiBjbGFzcyBNb2NrQnJvd3NlcihvYmplY3Qp
OgogICAgIHBhcmFtcyA9IHt9Cg==
</data>
<flag name="review"
          id="111334"
          type_id="1"
          status="+"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>