Skip to content
Tcl Source Code History Of Ticket 953284
Login

History Of Ticket 953284

Artifacts Associated With Ticket 953284

  1. Ticket change [40143fdf73] (rid 121564) by dgp on 2004-05-13 13:46:42:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      This test demos the problem.
      Filesystem paths violate 
      "everything is a string"
      Patch attached.
      
      test filesystem-1.42 {file normalisation: outdated
      cache} -setup {
          set w [makeDirectory wrong]
          makeFile wrong file $w
          set r [makeDirectory right]
          makeFile right file $r
          set link [file join [file dirname $w] link]
          file link $link wrong
      } -body {
          set p1 [file join $link file]       ;# $p1 and $p2
      have same (string)
          set p2 [file join $link file]       ;# value
          file normalize $p1          ;# cache the "wrong"
      normalized path
      
          file delete $link
          file link $link right       ;# change link reference
      
          # Because string values are the same, according to
      Tcl value
          # rules, these operations should produce consistent
      results.
          # They do not, because $p1 holds an outdated cached
      normalized
          # path, breaking "everything is a string".
          set result {}
          lappend result $p1
          set f [open $p1]
          lappend result [read -nonewline $f]
          close $f
          lappend result [file normalize $p1]
      
          lappend result $p2
          set f [open $p2]
          lappend result [read -nonewline $f]
          close $f
          lappend result [file normalize $p2]
      
      } -cleanup {
          file delete $link
          removeFile file $r
          removeDirectory right
          removeFile file $w
          removeDirectory wrong
      } -match glob -result\
      {*/link/file right */right/file */link/file right
      */right/file}
      
      
    4. foundin initialized to: "obsolete: 8.5a2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "normalized path cache gets outdated"
    11. type initialized to: "Bug"
  2. Add attachment "normcache.patch" [a1fec130f9] (rid 109820) by dgp on 2004-05-13 20:46:42.

  3. Ticket change [1a3d439b39] (rid 122944) by dgp on 2004-05-13 20:46:42:

    1. icomment:
      
      
      File Added - 87041: normcache.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [04244f17ae] (rid 119943) by vincentdarley on 2004-05-17 17:08:30:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Ugh.  This isn't nice.  Fixing it without removing all cache
      usage will be quite difficult.  Any suggestions?
      
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  5. Ticket change [fa7ae265fc] (rid 91885) by dgp on 2004-05-17 22:40:46:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Not yet.  Just wanted to
      get the matter "on the record".
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [0e168b392d] (rid 147622) by apnadkarni on 2016-07-08 08:21:51:

    1. assignee changed to: "aku"
    2. closer changed to: "nobody"
    3. comment changed to:
      This test demos the problem.
      Filesystem paths violate 
      "everything is a string"
      Patch attached.
      
      test filesystem-1.42 {file normalisation: outdated
      cache} -setup {
          set w [makeDirectory wrong]
          makeFile wrong file $w
          set r [makeDirectory right]
          makeFile right file $r
          set link [file join [file dirname $w] link]
          file link $link wrong
      } -body {
          set p1 [file join $link file]       ;# $p1 and $p2
      have same (string)
          set p2 [file join $link file]       ;# value
          file normalize $p1          ;# cache the "wrong"
      normalized path
      
          file delete $link
          file link $link right       ;# change link reference
      
          # Because string values are the same, according to
      Tcl value
          # rules, these operations should produce consistent
      results.
          # They do not, because $p1 holds an outdated cached
      normalized
          # path, breaking "everything is a string".
          set result {}
          lappend result $p1
          set f [open $p1]
          lappend result [read -nonewline $f]
          close $f
          lappend result [file normalize $p1]
      
          lappend result $p2
          set f [open $p2]
          lappend result [read -nonewline $f]
          close $f
          lappend result [file normalize $p2]
      
      } -cleanup {
          file delete $link
          removeFile file $r
          removeDirectory right
          removeFile file $w
          removeDirectory wrong
      } -match glob -result\
      {*/link/file right */right/file */link/file right
      */right/file}
      
    4. icomment:
      I don't know if this bug is still present as of 8.6.5 but as I noted for [a47641a031], imho file link should update the file system epoch just as mounting of file systems and changes to env do. That should flush the incorrect cached value.
      
    5. login: "apnadkarni"
    6. mimetype: "text/plain"
    7. severity changed to: "Minor"