I am assuming that the users of this package are following the rules I set and specified in the documentation, and so the code works for these situations.
Handling all the other possibilities does not have much value.
For example:
To make the whole code independent of the current working directory and where packages files are placed a couple of things should be done.
For example to get the path of the package we should do:
packagePath = Base.read(`cmd /c julia -e 'import MatLang; print(pathof(MatLang))'`, String)
Related to a couple of comments: https://github.com/timholy/SnoopCompile.jl/pull/49#discussion_r362444307 https://github.com/timholy/SnoopCompile.jl/pull/49#discussion_r362514505 https://github.com/timholy/SnoopCompile.jl/pull/49#discussion_r362442292
I am assuming that the users of this package are following the rules I set and specified in the documentation, and so the code works for these situations.
Handling all the other possibilities does not have much value.
For example:
To make the whole code independent of the current working directory and where packages files are placed a couple of things should be done. For example to get the path of the package we should do:
instead of https://github.com/aminya/SnoopCompile.jl/blob/32d36d1e9a2bc3d22fa90afe3652e2f404689e5d/src/bot/snoopiBot.jl#L30
or for
precompile_$packageName.jl
, some script can search in the package folder.or if the user decides to have multiple precompile inclusion by mistake, such as:
The code will not work.