A few more deprecations

This commit is contained in:
Chris de Graaf 2018-09-17 16:43:12 -05:00
parent 564a379c5e
commit 1385d6fa4b
3 changed files with 6 additions and 5 deletions

View File

@ -7,6 +7,7 @@ version = "0.1.0"
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
TerminalMenus = "dc548174-15c3-5faf-af27-7997cfbde655"

View File

@ -4,12 +4,12 @@ module PkgTemplates
using AutoHashEquals
using Dates
using Distributed
using InteractiveUtils
using LibGit2
using Mustache
using TerminalMenus
using URIParser
import LibGit2
export
# Template/package generation.
Template,

View File

@ -276,7 +276,7 @@ function interactive_template(; fast::Bool=false)
isempty(line) && break
tokens = split(line, " ", limit=2)
if haskey(gitconfig, tokens[1])
warn("Duplicate key '$(tokens[1])': Replacing old value '$(tokens[2])'")
@warn "Duplicate key '$(tokens[1])': Replacing old value '$(tokens[2])'"
end
gitconfig[tokens[1]] = tokens[2]
end
@ -285,7 +285,7 @@ function interactive_template(; fast::Bool=false)
println("Select plugins:")
# Only include plugin types which have an `interactive` method.
plugin_types = filter(t -> method_exists(interactive, (Type{t},)), fetch(plugin_types))
plugin_types = filter(t -> hasmethod(interactive, (Type{t},)), fetch(plugin_types))
type_names = map(t -> split(string(t), ".")[end], plugin_types)
menu = MultiSelectMenu(String.(type_names); pagesize=length(type_names))
selected = collect(request(menu))
@ -301,4 +301,4 @@ end
Get all concrete subtypes of `t`.
"""
leaves(t::Type)::Vector{DataType} = isleaftype(t) ? [t] : vcat(leaves.(subtypes(t))...)
leaves(t::Type)::Vector{DataType} = isconcretetype(t) ? [t] : vcat(leaves.(subtypes(t))...)