| Ticket UUID: | 86ceb4e2b63cfcee65abade0ed16c9ce846b4e30 | ||
| Title: | package require searching module path in wrong order | ||
| Type: | Bug | Created on: | 2013-07-15 05:47:53 |
| Submitter: | anonymous | Assigned to: | dgp |
| Subsystem: | 39. Package Manager | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2013-09-08 12:18:31 |
| Status: | Closed | Closed by: | dgp |
| Resolution: | Fixed | Closed on: | 2013-09-08 12:18:31 |
| Version: | 8.6 | ||
| Description: | ||||
|
The tm documentation says that a module should be loaded from the module path by looking from the first in the list to the last. However I find that the opposite is happening. The problem can be demonstrated as so:
I get:
If I create a file called: mymodtest-0.1.tm with the following contents:
I copy that file to the last location in the list above:
Then I edit the file, replace the 1 with a 2, and copy the file to the previous location in the list above:
Finally I edit the file again, replace the 2 with a 3, and copy the file to the previous location in the list above:
When I run the following script:
I get a 1; if I delete the file from the last location in the list, I get a 2; if I then delete the file from the previous location I get a 3.
| ||||
| User Comments: | ||||
dgp added on 2013-07-15 17:14:55:
The TM search is working as documented. Much more detail in the comp.lang.tcl followup. https://groups.google.com/d/msg/comp.lang.tcl/VXsAUOlPIXY/dXu7-Hq8dusJ dgp added on 2013-07-15 18:04:32:
Re-opened. In that same comp.lang.tcl thread, Gustaf Neumann suggests a tweak that might improve this situation and related ones, yet still be faithful to the assumptions in the [package require] design. dgp added on 2013-07-15 19:11:22:
See branch bug-86ceb4e2b6 for an idea how we might improve the experience of the OP while not revising the assumptions of [package require]. Thanks to Gustaf Neumann for the idea. jan.nijtmans added on 2013-09-06 22:27:15:
This change looks good to me. Planned for 8.6.1? dgp added on 2013-09-08 12:18:31:
Change accepted for 8.5.15 and 8.6.1. | ||||
