Skip to content

Commit

Permalink
removing precompile_pather_multios
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 16, 2020
1 parent e506c9c commit 8b3bda6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 deletions.
22 changes: 0 additions & 22 deletions src/bot/precompile_include.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,6 @@ allos_funs = [
return os, osfun
end
################################################################
"""
precompile_pather(package_name::String)
precompile_pather_multios(package_name::String)
To get the path of precompile_package_name.jl file
Written exclusively for SnoopCompile Github actions.
# Examples
```julia
precompile_path, precompileFolder = precompile_pather("MatLang")
```
"""
function precompile_pather(package_name::String)
return "\"../deps/SnoopCompile/precompile/precompile_$package_name.jl\"",
"$(pwd())/deps/SnoopCompile/precompile/"
end
function precompile_pather_multios(package_name::String)
os = detectos()[1]
return "\"../deps/SnoopCompile/precompile/$os/precompile_$package_name.jl\"",
"$(pwd())/deps/SnoopCompile/precompile/$os"
end
################################################################
"""
new_includer_file(package_path::String, precompile_path::String)
Expand Down
13 changes: 10 additions & 3 deletions src/bot/snoopi_bot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ macro snoopi_bot(config::BotConfig, snoop_script)
package_name = config.package_name
blacklist = config.blacklist
subst = config.subst
ismultios = config.ismultios
os = config.os
################################################################
package_path = joinpath(pwd(),"src","$package_name.jl")
precompile_path, precompileFolder = precompile_pather(package_name, ismultios)

# precompile folder for writing
if isnothing(os)
precompile_folder = "$(pwd())/deps/SnoopCompile/precompile/"
else
precompile_folder = "$(pwd())/deps/SnoopCompile/precompile/$(detectOS()[1])"
end

quote
packageSym = Symbol($package_name)
################################################################
Expand All @@ -47,7 +54,7 @@ macro snoopi_bot(config::BotConfig, snoop_script)
### Parse the compiles and generate precompilation scripts
pc = SnoopCompile.parcel(data, subst = $subst, blacklist = $blacklist)
onlypackage = Dict( packageSym => sort(pc[packageSym]) )
SnoopCompile.write($precompileFolder,onlypackage)
SnoopCompile.write($precompile_folder,onlypackage)
################################################################
precompile_activator($package_path, $precompile_path)
end
Expand Down

0 comments on commit 8b3bda6

Please sign in to comment.