Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b66e3dece445abceab83749f8e9ac64448561803
Ticket: 1426692fffffffffffffffffffffffffffffffff
package provide/package ifneeded mismatch errors
User & Date: twylite on 2007-04-25 16:01:54
Changes

  1. icomment:
    Logged In: YES 
    user_id=91629
    Originator: NO
    
    Then the selection logic is broken.
    
    The package manager is a straightforward dynamic linker, which means it must do two things:
    
    (a) If I ask for "version 1", it must give me the most appropriate version 1.x that it has.  Tcl does this.
    
    (b) But if I say that I am providing "version 1", then it must use that as a last-resort fallback if it doesn't have any more specific information to help it satisfy a request for some version 1.x.
    
    > [package require p 1.1] will fail, even though version 1.1 is available.
    
    See (b) above -- it should fall back to using the "ifneeded p 1" statement, which is the best information it has.
    
    > [package require -exact p 1] will "succeed" but it won't deliver the exact version requested.
    
    This is a consequence of the implementation of -exact.  There is no reason why it shouldn't be implemented so that it fails.  Similarly a [package require -exact p 1.1] should fall back to the "ifneeded p 1" statement, get a "provide p 1.1", and subsequently succeed.
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"