[tahoe-dev] new foolscap version requirement

David-Sarah Hopwood david-sarah at jacaranda.org
Fri Jan 7 21:10:53 UTC 2011


On 2011-01-07 06:25, Zooko O'Whielacronx wrote:
> On Thu, Jan 6, 2011 at 4:45 PM, David-Sarah Hopwood
> <david-sarah at jacaranda.org> wrote:
>>>
>>> http://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/src/allmydata/_auto_deps.py?annotate=blame&rev=4893#L99
>>
>> That code doesn't always work (in particular, due to the side-by-side
>> installation problem in #1246 and #1258). Note that the code at
>> <http://tahoe-lafs.org/trac/tahoe-lafs/attachment/ticket/585/bb-freeze.darcs.3.patch#L225>
>> does work in those cases.
> 
> Okay. I would be okay with using the current code even though it has
> issues #1246/#1258, or with merging your improvements if we can do
> that for v1.8.2. (As far as I understand, it often works, currently,
> despite those issues.)

The problem is that the circumstances under which it works are somewhat
unpredictable. It's not even feasible to reliably avoid the situation that
creates the problem. For example, the Windows installers for Twisted and
pywin32 can create it (as can package managers on other OSes).

I take a very hard line on testing the right code, and the same code that
is run. Any circumstance where you have asked the system to test or run
some code and it has actually tested or run different code, is unacceptable
because it invalidates debugging techniques, and can lead to a huge amount
of wasted time. That's why I marked #1287 as critical. The aspect of
#1246 and #1258 that can result in us silently passing tests that should
have failed is also critical. (I believe that the test_import_in_repl
patch attached to #1258 fixes that aspect.)

> Here's the quiz:
> 
> 1. You have Twisted < 10.2 installed on your system. You download
> Tahoe-LAFS v1.8.2 and run "python setup.py build". What do you want
> the build system to do?
> 
> option a: require foolscap >= 0.5.1
> 
> (Note: this was an easy question just to get you started.)

Require any version of foolscap that will work.

It is desirable for the requirement isn't too tight or recent, but not
at the expense of reducing the set of cases in which the resulting
Tahoe-LAFS build will work correctly. In particular, cases in which the
build succeeds and then the application fails at runtime are to be
minimized. It is somewhat OK if the *build* fails due to a conflict
with existing installed packages, provided that it fails with a message
that identifies the name and path of at least one of the conflicting
installations.

(Note, however, that it is perfectly possible not to use the installed
versions. That's my preferred default behaviour when there is a
conflict. The build system may have an option to force using the
installed versions, in which case the build should fail.)

> 2. You have Twisted >= 10.2 installed. You build Tahoe-LAFS v1.8.2.
> What do you want it to do?
> 
> option a: require foolscap >= 0.6.0
> 
> (Okay that was another easy one.)

Yes (because >= 0.6.0 is a version of foolscap that will work).

> 3. You have Twisted < 10.2 and Foolscap < 0.6.0 installed. You build
> Tahoe-LAFS. It is satisfied with the packages already installed
> (because 1=>a).

Nope, because I didn't answer 1=>a ;-)

> Then you manually upgrade your Twisted to == 10.2.
> Then you do *not* run Tahoe-LAFS's "python setup.py build" again, but
> you do run "tahoe start".

I think you mean 'bin/tahoe start'.

> What do you want it to do?
> 
> option a: emit a clear error message saying that it has Foolscap
> v0.5.1 installed but it needs Foolscap v0.6.0 and stop.
> 
> option b: ?

The situation shouldn't occur because 'setup.py build', by default,
should either:

 - have built a private copy of twisted < 10.2 (always used by bin/tahoe)
   that won't be affected by upgrades of the installed version, or
 - have built a private copy of foolscap 0.6.0 (always used by bin/tahoe).

(I assume we're talking about upgrading the installed twisted. Replacing
the copy under support/, if there is one, should cause an error message.)

> 4. Please write in your own quiz question here and answer it.

If I run 'bin/tahoe --version-and-path', modify a Python source file
below one of the given directories, and then run 'bin/tahoe' again
without doing a build, what should happen?

option a: it should use the modified source file

(This answer need not apply to frozen builds using bb-freeze/py2exe/etc.)

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20110107/ca62eb2e/attachment.pgp>


More information about the tahoe-dev mailing list