Let's create a test package/paclet in a standard $UserBaseDirectory/Applications
:
root = FileNameJoin[{$UserBaseDirectory, "Applications", "TestPaclet", ##}]&;
CreateFile @ root["Kernel", "init.m"]
Export[ root["Kernel", "init.m"], "Echo[$InputFileName]", "Text"];
Export[
root["PacletInfo.m"]
, Paclet[Name -> "TestPaclet",Version -> "0.0.1", MathematicaVersion -> "11+",
Description -> "", Creator -> "Kuba",
Extensions -> { {"Kernel", Context -> "TestPaclet`"}}]
];
And let's try it:
Get["TestPaclet`"];
Get["TestPaclet`", Path -> {$HomeDirectory}]
>> ...\Applications\TestPaclet\Kernel\init.m
Get::noopen: Cannot open TestPaclet`.
$Failed
Before Paclets
appeared, Path
option for Get
shielded against the default $Path
. Which I find expected and desired but I can agree it is subjective. Anyway, it is not the case for default paclets repositories:
PacletInstall @ PackPaclet @ root[]
Get["TestPaclet`"];
Get["TestPaclet`", Path -> {$HomeDirectory}];
Paclet[TestPaclet,0.0.1,<>]
>> ...\Paclets\Repository\TestPaclet-0.0.1\Kernel\init.m
>> ...\Paclets\Repository\TestPaclet-0.0.1\Kernel\init.m
Considering previous behavior I find the new one a bug.
[CASE:4016445] was created
$Path
and yourPaclets/Repository
is just where the paclet is, nothing more. $\endgroup$Path
(the option) does not say anything about$Path
. And again, I don't insist onGet["TestPaclet`", Path -> {FileNameJoin[{$UserBaseDirectory, "Applications"}]}]
reachingApplications
(though that is expected). Where is that (this or linked) behavior documented? If we mark it a duplicate the OP deserves bugs tag. $\endgroup$