Overview
| Artifact ID: | 0ced46e609fea563f295be2b6e5a082ebc7d8d1e9630c6ea8d744c35d6751493 |
|---|---|
| Ticket: | a998df01f3256f79f4d7d635517130012b4001f5
Attempt to load platform package in a pkgIndex.tcl generates circular dependency error |
| User & Date: | apnadkarni on 2022-07-05 02:37:51 |
Changes
- icomment:
I understand why this is happening but that does not mean it's not a bug. * I don't think it is documented anywhere that pkgIndex.tcl cannot contain a package required or that it should not do a load. * In fact this has been working code for all releases up to this point. If 8.7 changes this, it is no longer 8.6 compatible in my view. * TIP 459 does not mention this additional *new* restriction on pkgIndex.tcl files at all. Given the above, I'm not sure why you say the *correct* way is to move it to testpkg.tcl. I would say it's a workaround for a bug! As to why not move it into the testpkg.tcl file, the reason is that there may not be a testpkg.tcl file at all, only a binary. The example I gave was just for illustration. The actual pkgIndex.tcl file would look something like this (pseudo-code, no existence checks etc) ``` package require platform package ifneeded testpkg 0.1 [list load [file join $dir [platform::identify] mybinaryextension.[info sharedlibextension]] ``` This permits a multi-platform install/distribution. You are now saying pkgIndex.tcl should not do a load either. Now in 8.7, an extra unnecessary .tcl file is needed where none was needed before. This is a step back but more important, binary extensions as above will no longer load in 8.7. Not just that, they actually break the package loading for all packages. Re-opening as I do not consider this as an invalid ticket or user error. /Ashok
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- resolution changed to: "None"
- status changed to: "Open"